You are here

interface ParentCandidateInterface in Entity Reference Hierarchy 3.x

Same name and namespace in other branches
  1. 8.2 src/Information/ParentCandidateInterface.php \Drupal\entity_hierarchy\Information\ParentCandidateInterface

Defines an interface for determining if an entity is a parent candidate.

Hierarchy

Expanded class hierarchy of ParentCandidateInterface

All classes that implement ParentCandidateInterface

7 files declare their use of ParentCandidateInterface
EntityHooks.php in modules/entity_hierarchy_microsite/src/EntityHooks.php
HierarchyChildrenForm.php in src/Form/HierarchyChildrenForm.php
MicrositeCacheContext.php in modules/entity_hierarchy_microsite/src/Cache/MicrositeCacheContext.php
MicrositeMenuLinkDiscovery.php in modules/entity_hierarchy_microsite/src/MicrositeMenuLinkDiscovery.php
ParentEntityDeleteUpdater.php in src/Storage/ParentEntityDeleteUpdater.php

... See full list

File

src/Information/ParentCandidateInterface.php, line 10

Namespace

Drupal\entity_hierarchy\Information
View source
interface ParentCandidateInterface {

  /**
   * Gets all fields that allow referencing this entity as a parent.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   Entity to get parent candidate fields for.
   *
   * @return array
   *   Field names that would allow referencing this entity as a parent.
   */
  public function getCandidateFields(EntityInterface $entity);

  /**
   * Gets all bundles that allow referencing this entity as a parent.
   *
   * @param \Drupal\Core\Entity\EntityInterface $entity
   *   Entity to get parent candidate bundles for.
   *
   * @return array
   *   Bundles that support this entity as parent, keyed by field name.
   */
  public function getCandidateBundles(EntityInterface $entity);

}

Members

Namesort descending Modifiers Type Description Overrides
ParentCandidateInterface::getCandidateBundles public function Gets all bundles that allow referencing this entity as a parent. 1
ParentCandidateInterface::getCandidateFields public function Gets all fields that allow referencing this entity as a parent. 1