diff --git a/src/Plugin/Condition/EntityBundle.php b/src/Plugin/Condition/EntityBundle.php index 96fa76d1..77cf2826 100644 --- a/src/Plugin/Condition/EntityBundle.php +++ b/src/Plugin/Condition/EntityBundle.php @@ -13,6 +13,7 @@ use Drupal\Core\Form\FormStateInterface; * label = @Translation("Entity Bundle"), * context = { * "node" = @ContextDefinition("entity:node", required = FALSE, label = @Translation("Node")), + * "media" = @ContextDefinition("entity:media", required = FALSE, label = @Translation("Media")), * "taxonomy_term" = @ContextDefinition("entity:taxonomy_term", required = FALSE, label = @Translation("Term")) * } * ) @@ -24,7 +25,7 @@ class EntityBundle extends ConditionPluginBase { */ public function buildConfigurationForm(array $form, FormStateInterface $form_state) { $options = []; - foreach (['node', 'taxonomy_term'] as $content_entity) { + foreach (['node', 'media', 'taxonomy_term'] as $content_entity) { $bundles = \Drupal::service('entity_type.bundle.info')->getBundleInfo($content_entity); foreach ($bundles as $bundle => $bundle_properties) { $options[$bundle] = $this->t('@bundle (@type)', [