You are here

public function FormatExportLink::getDerivativeDefinitions in Bibliography & Citation 2.0.x

Same name and namespace in other branches
  1. 8 modules/bibcite_export/src/Plugin/Derivative/FormatExportLink.php \Drupal\bibcite_export\Plugin\Derivative\FormatExportLink::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/bibcite_export/src/Plugin/Derivative/FormatExportLink.php, line 42

Class

FormatExportLink
Provides dynamic tabs based on available formats.

Namespace

Drupal\bibcite_export\Plugin\Derivative

Code

public function getDerivativeDefinitions($base_plugin_definition) {
  foreach ($this->formatManager
    ->getDefinitions() as $format_id => $format_definition) {
    $this->derivatives[$format_id] = $base_plugin_definition;
    $this->derivatives[$format_id]['label'] = $format_definition['label'];
    $this->derivatives[$format_id]['export_format'] = $format_id;
  }
  return $this->derivatives;
}