You are here

public function TaxonomyMenuMenuLink::getDerivativeDefinitions in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 modules/taxonomy_menu/src/Plugin/Derivative/TaxonomyMenuMenuLink.php \Drupal\taxonomy_menu\Plugin\Derivative\TaxonomyMenuMenuLink::getDerivativeDefinitions()

Gets the definition of all derivatives of a base plugin.

Parameters

array $base_plugin_definition: The definition array of the base plugin.

Return value

array An array of full derivative definitions keyed on derivative id.

Overrides DeriverBase::getDerivativeDefinitions

See also

getDerivativeDefinition()

File

modules/taxonomy_menu/src/Plugin/Derivative/TaxonomyMenuMenuLink.php, line 51
Contains \Drupal\taxonomy_menu\Plugin\Derivative\TaxonomyMenuMenuLink.

Class

TaxonomyMenuMenuLink
Provides menu links for Taxonomy Menus.

Namespace

Drupal\taxonomy_menu\Plugin\Derivative

Code

public function getDerivativeDefinitions($base_plugin_definition) {
  $links = array();

  /** @var $taxonomy_menus \Drupal\taxonomy_menu\TaxonomyMenuInterface[] */
  $taxonomy_menus = $this->taxonomyMenuStorage
    ->loadMultiple();
  foreach ($taxonomy_menus as $taxonomy_menu) {
    $links = array_merge($links, $taxonomy_menu
      ->getLinks($base_plugin_definition));
  }
  return $links;
}