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
1 changed files with 11 additions and 11 deletions

View File

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