You are here

interface ReferenceFinderInterface in Term reference change 8

Defines an interface for a service that finds entities referencing a term.

Hierarchy

Expanded class hierarchy of ReferenceFinderInterface

All classes that implement ReferenceFinderInterface

File

src/ReferenceFinderInterface.php, line 10

Namespace

Drupal\term_reference_change
View source
interface ReferenceFinderInterface {

  /**
   * Finds and loads all entities with a reference to the given term.
   *
   * @param \Drupal\taxonomy\TermInterface $term
   *   The term to find references to.
   *
   * @return \Drupal\Core\Entity\EntityInterface[]
   *   All entities referencing the given term.
   */
  public function findReferencesFor(TermInterface $term);

  /**
   * Finds all term reference fields.
   *
   * @return array
   *   Nested array of field names for taxonomy term entity reference fields.
   *   [entity type id][bundle id] = array of field names.
   */
  public function findTermReferenceFields();

}

Members

Namesort descending Modifiers Type Description Overrides
ReferenceFinderInterface::findReferencesFor public function Finds and loads all entities with a reference to the given term. 1
ReferenceFinderInterface::findTermReferenceFields public function Finds all term reference fields. 1