You are here

public function TrackerInterface::getHostData in Menu Entity Index 8

Gets host information for a target entity.

Parameters

\Drupal\Core\Entity\EntityInterface $entity: The target entity to get the host information for.

Return value

array Host information for target entity. For each menu link that references that entity, an array value will be returned. That value is an array with the following keys:

  • menu_name: Menu name of menu link referencing the entity.
  • level: Menu level of menu link referencing the entity.
  • label: Label of menu link referencing the entity.
  • link: URL object for edit page of menu link referencing the entity. If the current user does not have access to view the menu link, the key contains an empty string instead.
  • language: Name of language of menu link referencing the entity.
1 method overrides TrackerInterface::getHostData()
Tracker::getHostData in src/Tracker.php
Gets host information for a target entity.

File

src/TrackerInterface.php, line 55

Class

TrackerInterface
Defines an interface for classes tracking entities referenced by menu links.

Namespace

Drupal\menu_entity_index

Code

public function getHostData(EntityInterface $entity);