Commented out actor types per case in entity relations widget

This commit is contained in:
naomi 2021-12-04 06:47:38 +00:00
parent 90c4462512
commit 24a8e8864f

View File

@ -14,17 +14,17 @@ class EntityTypeRelationsWidget {
* $form - the form to be modified (reference) * $form - the form to be modified (reference)
*/ */
public function setup(&$form) { public function setup(&$form) {
$actor_types = \Drupal::service('entity_type.bundle.info')->getBundleInfo('oc_actor'); # $actor_types = \Drupal::service('entity_type.bundle.info')->getBundleInfo('oc_actor');
$options = array(); # $options = array();
foreach($actor_types as $machine_name => $info) { # foreach($actor_types as $machine_name => $info) {
$options[$machine_name] = $info['label']; # $options[$machine_name] = $info['label'];
} # }
$form['allowed_actor_types'] = array( # $form['allowed_actor_types'] = array(
'#title' => t('Allowed involved parties'), # '#title' => t('Allowed involved parties'),
'#description' => t('Types of people that can be involved in this kind of case.'), # '#description' => t('Types of people that can be involved in this kind of case.'),
'#type' => 'checkboxes', # '#type' => 'checkboxes',
'#options' => $options # '#options' => $options
); # );
$activity_types = \Drupal::service('entity_type.bundle.info')->getBundleInfo('oc_activity'); $activity_types = \Drupal::service('entity_type.bundle.info')->getBundleInfo('oc_activity');
$options = array(); $options = array();
foreach($activity_types as $machine_name => $info) { foreach($activity_types as $machine_name => $info) {