18 lines
593 B
PHP
18 lines
593 B
PHP
<?php
|
|
|
|
namespace Drupal\opencase;
|
|
|
|
/**
|
|
* Stuff to do with the relationship of case types to actor types, and activity types to case types
|
|
*
|
|
*/
|
|
class EntityTypeRelations {
|
|
|
|
public static function getAllowedActivityTypesForCaseType($case_type) {
|
|
$caseTypeConfig = \Drupal::entityTypeManager()->getStorage('oc_case_type')->load($case_type);
|
|
$allowedActivityTypes = $caseTypeConfig->get('allowedActivityTypes'); // format: ['application' => 'application', 'interview' => 0]
|
|
if (!$allowedActivityTypes) $allowedActivityTypes = array();
|
|
return $allowedActivityTypes;
|
|
}
|
|
}
|