Term::setWeight

public Term::setWeight($weight) Gets the weight of this term. Parameters int $weight: The term's weight. Return value $this Overrides TermInterface::setWeight File core/modules/taxonomy/src/Entity/Term.php, line 225 Class Term Defines the taxonomy term entity. Namespace Drupal\taxonomy\Entity Code public function setWeight($weight) { $this->set('weight', $weight); return $this; }

Term::setFormat

public Term::setFormat($format) Sets the text format name for the term's description. Parameters string $format: The term's description text format. Return value $this Overrides TermInterface::setFormat File core/modules/taxonomy/src/Entity/Term.php, line 195 Class Term Defines the taxonomy term entity. Namespace Drupal\taxonomy\Entity Code public function setFormat($format) { $this->get('description')->format = $format; return $this; }

Term::setDescription

public Term::setDescription($description) Sets the term's description. Parameters string $description: The term's description. Return value $this Overrides TermInterface::setDescription File core/modules/taxonomy/src/Entity/Term.php, line 180 Class Term Defines the taxonomy term entity. Namespace Drupal\taxonomy\Entity Code public function setDescription($description) { $this->set('description', $description); return $this; }

Term::postSave

public Term::postSave(EntityStorageInterface $storage, $update = TRUE) Acts on a saved entity before the insert or update hook is invoked. Used after the entity is saved, but before invoking the insert or update hook. Note that in case of translatable content entities this callback is only fired on their current translation. It is up to the developer to iterate over all translations if needed. Parameters \Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object. bool $upda

Term::postDelete

public static Term::postDelete(EntityStorageInterface $storage, array $entities) Acts on deleted entities before the delete hook is invoked. Used after the entities are deleted but before invoking the delete hook. Parameters \Drupal\Core\Entity\EntityStorageInterface $storage: The entity storage object. \Drupal\Core\Entity\EntityInterface[] $entities: An array of entities. Overrides Entity::postDelete File core/modules/taxonomy/src/Entity/Term.php, line 60 Class Term Defines the taxonomy

Term::getWeight

public Term::getWeight() Gets the weight of this term. Return value int The weight of the term. Overrides TermInterface::getWeight File core/modules/taxonomy/src/Entity/Term.php, line 218 Class Term Defines the taxonomy term entity. Namespace Drupal\taxonomy\Entity Code public function getWeight() { return $this->get('weight')->value; }

Term::getFormat

public Term::getFormat() Gets the text format name for the term's description. Return value string The text format name. Overrides TermInterface::getFormat File core/modules/taxonomy/src/Entity/Term.php, line 188 Class Term Defines the taxonomy term entity. Namespace Drupal\taxonomy\Entity Code public function getFormat() { return $this->get('description')->format; }

Term::getDescription

public Term::getDescription() Gets the term's description. Return value string The term description. Overrides TermInterface::getDescription File core/modules/taxonomy/src/Entity/Term.php, line 173 Class Term Defines the taxonomy term entity. Namespace Drupal\taxonomy\Entity Code public function getDescription() { return $this->get('description')->value; }

Term::getVocabularyId

public Term::getVocabularyId() Get the taxonomy vocabulary id this term belongs to. Return value int The id of the vocabulary. Overrides TermInterface::getVocabularyId File core/modules/taxonomy/src/Entity/Term.php, line 233 Class Term Defines the taxonomy term entity. Namespace Drupal\taxonomy\Entity Code public function getVocabularyId() { return $this->get('vid')->target_id; }

Term::baseFieldDefinitions

public static Term::baseFieldDefinitions(EntityTypeInterface $entity_type) Provides base field definitions for an entity type. Implementations typically use the class \Drupal\Core\Field\BaseFieldDefinition for creating the field definitions; for example a 'name' field could be defined as the following: $fields['name'] = BaseFieldDefinition::create('string') ->setLabel(t('Name')); By definition, base fields are fields that exist for every bundle. To provide definitions for fields that sho