Defines the taxonomy term entity.
@Plugin(
id = "taxonomy_term",
label = @Translation("Taxonomy term"),
module = "taxonomy",
controller_class = "Drupal\taxonomy\TermStorageController",
render_controller_class = "Drupal\taxonomy\TermRenderController",
form_controller_class = {
"default" = "Drupal\taxonomy\TermFormController"
},
translation_controller_class = "Drupal\taxonomy\TermTranslationController",
base_table = "taxonomy_term_data",
uri_callback = "taxonomy_term_uri",
fieldable = TRUE,
entity_keys = {
"id" = "tid",
"bundle" = "vocabulary_machine_name",
"label" = "name",
"uuid" = "uuid"
},
bundle_keys = {
"bundle" = "machine_name"
},
view_modes = {
"full" = {
"label" = "Taxonomy term page",
"custom_settings" = FALSE
}
},
menu_base_path = "taxonomy/term/%taxonomy_term"
)
Expanded class hierarchy of Term
class Term extends Entity implements ContentEntityInterface {
/**
* The taxonomy term ID.
*
* @var integer
*/
public $tid;
/**
* The term UUID.
*
* @var string
*/
public $uuid;
/**
* The taxonomy vocabulary ID this term belongs to.
*
* @var integer
*/
public $vid;
/**
* Name of the term.
*
* @var string
*/
public $name;
/**
* Description of the term.
*
* @var string
*/
public $description;
/**
* The text format name for the term's description.
*
* @var string
*/
public $format;
/**
* The weight of this term.
*
* This property stores the weight of this term in relation to other terms of
* the same vocabulary.
*
* @var integer
*/
public $weight = 0;
/**
* The parent term(s) for this term.
*
* This property is not loaded, but may be used to modify the term parents via
* Term::save().
*
* The property can be set to an array of term IDs. An entry of 0 means this
* term does not have any parents. When omitting this variable during an
* update, the existing hierarchy for the term remains unchanged.
*
* @var array
*/
public $parent;
/**
* The machine name of the vocabulary the term is assigned to.
*
* If not given, this value will be set automatically by loading the
* vocabulary based on the $entity->vid property.
*
* @var string
*/
public $vocabulary_machine_name;
/**
* Implements Drupal\Core\Entity\EntityInterface::id().
*/
public function id() {
return $this->tid;
}
/**
* Implements Drupal\Core\Entity\EntityInterface::bundle().
*/
public function bundle() {
return $this->vocabulary_machine_name;
}
}
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
Entity:: |
protected | property | Boolean indicating whether the entity should be forced to be new. | |
Entity:: |
protected | property | The entity type. | |
Entity:: |
protected | property | Indicates whether this is the default revision. | 1 |
Entity:: |
public | property | The language code of the entity's default language. | 4 |
Entity:: |
protected | property | Boolean indicating whether a new revision should be created on save. | |
Entity:: |
public | function |
Implements AccessibleInterface::access(). Overrides AccessibleInterface:: |
|
Entity:: |
public | function |
Implements EntityInterface::createDuplicate(). Overrides EntityInterface:: |
3 |
Entity:: |
public | function |
Implements EntityInterface::delete(). Overrides EntityInterface:: |
|
Entity:: |
public | function |
Implements EntityInterface::enforceIsNew(). Overrides EntityInterface:: |
|
Entity:: |
public | function |
Implements EntityInterface::entityInfo(). Overrides EntityInterface:: |
|
Entity:: |
public | function |
Implements EntityInterface::entityType(). Overrides EntityInterface:: |
|
Entity:: |
public | function |
Implements EntityInterface::get(). Overrides ComplexDataInterface:: |
2 |
Entity:: |
public | function | Implements ComplexDataInterface::getIterator(). | 1 |
Entity:: |
public | function |
Implements ComplexDataInterface::getProperties(). Overrides ComplexDataInterface:: |
1 |
Entity:: |
public | function |
Implements ComplexDataInterface::getPropertyDefinition(). Overrides ComplexDataInterface:: |
1 |
Entity:: |
public | function |
Implements ComplexDataInterface::getPropertyDefinitions(). Overrides ComplexDataInterface:: |
1 |
Entity:: |
public | function |
Implements ComplexDataInterface::getPropertyValues(). Overrides ComplexDataInterface:: |
1 |
Entity:: |
public | function |
Implements Drupal\Core\Entity\EntityInterface::getRevisionId(). Overrides EntityInterface:: |
3 |
Entity:: |
public | function |
Implements TranslatableInterface::getTranslation(). Overrides TranslatableInterface:: |
1 |
Entity:: |
public | function |
Implements TranslatableInterface::getTranslationLanguages(). Overrides TranslatableInterface:: |
1 |
Entity:: |
public | function |
Implements Drupal\Core\Entity\EntityInterface::isDefaultRevision(). Overrides EntityInterface:: |
1 |
Entity:: |
public | function |
Implements ComplexDataInterface::isEmpty(). Overrides ComplexDataInterface:: |
1 |
Entity:: |
public | function |
Implements EntityInterface::isNew(). Overrides EntityInterface:: |
1 |
Entity:: |
public | function |
Implements EntityInterface::isNewRevision(). Overrides EntityInterface:: |
|
Entity:: |
public | function |
Implements EntityInterface::label(). Overrides EntityInterface:: |
1 |
Entity:: |
public | function |
Implements TranslatableInterface::language(). Overrides TranslatableInterface:: |
1 |
Entity:: |
public | function |
Implements EntityInterface::save(). Overrides EntityInterface:: |
3 |
Entity:: |
public | function |
Implements ComplexDataInterface::set(). Overrides ComplexDataInterface:: |
2 |
Entity:: |
public | function |
Implements EntityInterface::setNewRevision(). Overrides EntityInterface:: |
|
Entity:: |
public | function |
Implements ComplexDataInterface::setPropertyValues(). Overrides ComplexDataInterface:: |
1 |
Entity:: |
public | function | Returns the languages the entity is translated to. | |
Entity:: |
public | function |
Implements EntityInterface::uri(). Overrides EntityInterface:: |
1 |
Entity:: |
public | function |
Implements EntityInterface::uuid(). Overrides EntityInterface:: |
1 |
Entity:: |
public | function | Constructs an Entity object. | 2 |
Term:: |
public | property | Description of the term. | |
Term:: |
public | property | The text format name for the term's description. | |
Term:: |
public | property | Name of the term. | |
Term:: |
public | property | The parent term(s) for this term. | |
Term:: |
public | property | The taxonomy term ID. | |
Term:: |
public | property | The term UUID. | |
Term:: |
public | property | The taxonomy vocabulary ID this term belongs to. | |
Term:: |
public | property | The machine name of the vocabulary the term is assigned to. | |
Term:: |
public | property | The weight of this term. | |
Term:: |
public | function |
Implements Drupal\Core\Entity\EntityInterface::bundle(). Overrides Entity:: |
|
Term:: |
public | function |
Implements Drupal\Core\Entity\EntityInterface::id(). Overrides Entity:: |