You are here

public function TaxonomyTreeBuilder::getNodeId in Entity Reference Tree Widget 8

Same name and namespace in other branches
  1. 2.x src/Tree/TaxonomyTreeBuilder.php \Drupal\entity_reference_tree\Tree\TaxonomyTreeBuilder::getNodeId()

Get the ID of a tree node.

Parameters

\Drupal\taxonomy\TermInterface $entity: The entity for the tree node.

Return value

string|int|null The id of the tree node for the entity.

Overrides TreeBuilderInterface::getNodeId

File

src/Tree/TaxonomyTreeBuilder.php, line 122

Class

TaxonomyTreeBuilder
Provides a class for building a tree from taxonomy entity.

Namespace

Drupal\entity_reference_tree\Tree

Code

public function getNodeId($entity) {
  return $entity->tid;
}