diff --git a/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php b/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php index 9fa07163678..9ae0b996c44 100644 --- a/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php +++ b/core/modules/taxonomy/src/Plugin/views/relationship/NodeTermData.php @@ -5,6 +5,7 @@ namespace Drupal\taxonomy\Plugin\views\relationship; use Drupal\Core\Database\Database; use Drupal\Core\Form\FormStateInterface; use Drupal\taxonomy\VocabularyStorageInterface; +use Drupal\views\Attribute\ViewsRelationship; use Drupal\views\Plugin\views\relationship\RelationshipPluginBase; use Symfony\Component\DependencyInjection\ContainerInterface; @@ -12,9 +13,8 @@ use Symfony\Component\DependencyInjection\ContainerInterface; * Relationship handler to return the taxonomy terms of nodes. * * @ingroup views_relationship_handlers - * - * @ViewsRelationship("node_term_data") */ +#[ViewsRelationship("node_term_data")] class NodeTermData extends RelationshipPluginBase { /** diff --git a/core/modules/views/src/Attribute/ViewsRelationship.php b/core/modules/views/src/Attribute/ViewsRelationship.php new file mode 100644 index 00000000000..fd8fe1f18de --- /dev/null +++ b/core/modules/views/src/Attribute/ViewsRelationship.php @@ -0,0 +1,19 @@ +