You are here

public function TaxonomyTreeBuilder::getNodeId in Entity Reference Tree Widget 2.x

Same name and namespace in other branches
  1. 8 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;
}