interface TreeBuilderInterface in Entity Reference Tree Widget 2.x
Same name and namespace in other branches
- 8 src/Tree/TreeBuilderInterface.php \Drupal\entity_reference_tree\Tree\TreeBuilderInterface
Provides an interface for a tree builder.
Hierarchy
- interface \Drupal\entity_reference_tree\Tree\TreeBuilderInterface
Expanded class hierarchy of TreeBuilderInterface
All classes that implement TreeBuilderInterface
File
- src/
Tree/ TreeBuilderInterface.php, line 10
Namespace
Drupal\entity_reference_tree\TreeView source
interface TreeBuilderInterface {
/**
* Load all entities from an entity bundle for the tree.
*
* @param string $entityType
* The type of the entity.
*
* @param string $bundleID
* The bundle ID.
*
* @return array
* All entities in the entity bundle.
*/
public function loadTree(string $entityType, string $bundleID, string $langCode = NULL, int $parent = 0, int $max_depth = NULL);
/**
* Create a tree node.
*
* @param $entity
* The entity for the tree node.
*
* @param array $selected
* A anrray for all selected nodes.
*
* @return array
* The tree node for the entity.
*/
public function createTreeNode($entity, array $selected = []);
/**
* Get the ID of a tree node.
*
* @param $entity
* The entity for the tree node.
*
* @return string|int|null
* The id of the tree node for the entity.
*/
public function getNodeId($entity);
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
TreeBuilderInterface:: |
public | function | Create a tree node. | 2 |
TreeBuilderInterface:: |
public | function | Get the ID of a tree node. | 2 |
TreeBuilderInterface:: |
public | function | Load all entities from an entity bundle for the tree. | 2 |