diff --git a/core/modules/taxonomy/config/schema/taxonomy.schema.yml b/core/modules/taxonomy/config/schema/taxonomy.schema.yml index c3d0bd4..81810f0 100644 --- a/core/modules/taxonomy/config/schema/taxonomy.schema.yml +++ b/core/modules/taxonomy/config/schema/taxonomy.schema.yml @@ -112,3 +112,10 @@ entity_form_display.field.taxonomy_autocomplete: placeholder: type: label label: 'Placeholder' +condition.plugin.vocabulary: + type: condition.plugin + mapping: + bundles: + type: sequence + sequence: + - type: string diff --git a/core/modules/taxonomy/src/Plugin/Condition/Vocabulary.php b/core/modules/taxonomy/src/Plugin/Condition/Vocabulary.php index 0d0a607..cf09dcb 100644 --- a/core/modules/taxonomy/src/Plugin/Condition/Vocabulary.php +++ b/core/modules/taxonomy/src/Plugin/Condition/Vocabulary.php @@ -117,6 +117,9 @@ public function summary() { * {@inheritdoc} */ public function evaluate() { + if (empty($this->configuration['bundles']) && !$this->isNegated()) { + return TRUE; + } /* @var \Drupal\taxonomy\TermInterface $term */ $term = $this->getContextValue('term'); return !empty($this->configuration['bundles'][$term->getVocabularyId()]);