You are here

interface HierarchyInterface in Facets 8

Interface HierarchyInterface.

Hierarchy

Expanded class hierarchy of HierarchyInterface

All classes that implement HierarchyInterface

File

src/Hierarchy/HierarchyInterface.php, line 8

Namespace

Drupal\facets\Hierarchy
View source
interface HierarchyInterface {

  /**
   * Retrieve all parent ids for one specific id.
   *
   * @param string $id
   *   An entity id.
   *
   * @return array
   *   An array of all parent ids.
   */
  public function getParentIds($id);

  /**
   * Retrieve all children and nested children for one specific id.
   *
   * @param string $id
   *   An entity id.
   *
   * @return array
   *   An array of all child ids.
   */
  public function getNestedChildIds($id);

  /**
   * Retrieve the direct children for an array of ids.
   *
   * @param array $ids
   *   An array of ids.
   *
   * @return array
   *   Given parent ids as key, value is an array of child ids.
   */
  public function getChildIds(array $ids);

  /**
   * Retrieve the siblings for an array of ids.
   *
   * @param array $ids
   *   An array of ids.
   * @param array $activeIds
   *   An array of currently active ids.
   * @param bool $parentSiblings
   *   Show parent siblings.
   *
   * @return array
   *   Given sibling ids as key, value is an array of ids.
   */
  public function getSiblingIds(array $ids, array $activeIds = [], bool $parentSiblings = TRUE);

}

Members

Namesort descending Modifiers Type Description Overrides
HierarchyInterface::getChildIds public function Retrieve the direct children for an array of ids. 1
HierarchyInterface::getNestedChildIds public function Retrieve all children and nested children for one specific id. 1
HierarchyInterface::getParentIds public function Retrieve all parent ids for one specific id. 1
HierarchyInterface::getSiblingIds public function Retrieve the siblings for an array of ids. 1