Added case provider role to opencase config

This commit is contained in:
2022-04-03 17:52:12 +01:00
parent 167166b898
commit 614293c114
5 changed files with 26 additions and 15 deletions

View File

@ -8,6 +8,8 @@ declare(strict_types = 1);
use Drupal\Core\Routing\RouteMatchInterface;
use function PHPUnit\Framework\isEmpty;
/**
* Implements hook_help().
*/
@ -94,7 +96,8 @@ function opencase_cases_get_activities(Drupal\opencase_cases\entity\OCCase $case
}
function opencase_cases_get_amount(Drupal\opencase_cases\entity\OCCaseFee $case_fee): string {
return $case_fee->amount->first()->value;
if (!isEmpty($case_fee->amount)) return $case_fee->amount->first()->value;
else return '0';
}
function opencase_cases_get_case(Drupal\opencase_cases\entity\OCCaseFee $case_fee): Drupal\opencase_cases\entity\OCCase {