public property Term::$parent

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.

Type: \Drupal\Core\Entity\Field\FieldInterface

File

drupal/core/modules/taxonomy/lib/Drupal/taxonomy/Plugin/Core/Entity/Term.php, line 121
Definition of Drupal\taxonomy\Plugin\Core\Entity\Term.

Class

Term
Defines the taxonomy term entity.

Namespace

Drupal\taxonomy\Plugin\Core\Entity

Code

public $parent;