You are here

protected function EntityField::getEntityContextDataEntityBundleOptions in Entity Field Condition 2.0.x

The entity context data entity bundle options.

Return value

array An array of entity bundle types.

Throws

\Drupal\Component\Plugin\Exception\PluginException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

1 call to EntityField::getEntityContextDataEntityBundleOptions()
EntityField::buildConfigurationForm in src/Plugin/Condition/EntityField.php
Form constructor.

File

src/Plugin/Condition/EntityField.php, line 281

Class

EntityField
Define the entity field condition base class.

Namespace

Drupal\entity_field_condition\Plugin\Condition

Code

protected function getEntityContextDataEntityBundleOptions() : array {
  $options = [];
  foreach ($this
    ->getEntityContextDataEntityBundleTypes() as $type => $info) {
    if (!isset($info['label'])) {
      continue;
    }
    $options[$type] = $info['label'];
  }
  return $options;
}