diff --git a/README.md b/README.md index 541a9a6..8bbd004 100644 --- a/README.md +++ b/README.md @@ -7,10 +7,10 @@ assignment, but also the ability to simply the list for end users. ## Functionality This module provides an additional base field on all taxonomy terms which tracks -the highest level parent term in the tree. This is used to identify the root term -and use the root term as a relationship in view and in custom queries, without -needing to construct complex queries which may not be able to handle the dynamic -depths of taxonomy trees. +the highest level parent term in the tree. This is used to identify the root +term and use the root term as a relationship in view and in custom queries, +without needing to construct complex queries which may not be able to handle +the dynamic depths of taxonomy trees. ## Installation @@ -25,4 +25,5 @@ to ensure that data is available for any existing terms. ## Support If you have any issues with this module, or would like to request new features, -please open a support ticket for this project at https://www.drupal.org/project/taxonomy_term_root +please open a support ticket for this project at +https://www.drupal.org/project/taxonomy_term_root diff --git a/taxonomy_term_root.install b/taxonomy_term_root.install index c4e4b57..c7c27c9 100644 --- a/taxonomy_term_root.install +++ b/taxonomy_term_root.install @@ -1,5 +1,10 @@ setLabel(t('Root Term')) - ->setDescription(t('The highest parent term of this node.')) - ->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED) - ->setSetting('target_type', 'taxonomy_term') - ->setReadOnly(TRUE) - ->setClass('\\Drupal\\taxonomy_term_root\\ComputedRootTerm'); + ->setLabel(t('Root Term')) + ->setDescription(t('The highest parent term of this node.')) + ->setCardinality(FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED) + ->setSetting('target_type', 'taxonomy_term') + ->setReadOnly(TRUE) + ->setClass('\\Drupal\\taxonomy_term_root\\ComputedRootTerm'); $definition_manager = \Drupal::entityDefinitionUpdateManager(); $definition_manager->installFieldStorageDefinition('root', 'taxonomy_term', 'taxonomy_term', $definition); diff --git a/taxonomy_term_root.module b/taxonomy_term_root.module index ceddc53..5c07bcd 100644 --- a/taxonomy_term_root.module +++ b/taxonomy_term_root.module @@ -1,5 +1,10 @@