public function VoyagerMenuLinkDeriver::getDerivativeDefinitions in GraphQL 8.3
Same name and namespace in other branches
- 8.4 src/Plugin/MenuLink/Deriver/VoyagerMenuLinkDeriver.php \Drupal\graphql\Plugin\MenuLink\Deriver\VoyagerMenuLinkDeriver::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
- src/
Plugin/ MenuLink/ Deriver/ VoyagerMenuLinkDeriver.php, line 39
Class
Namespace
Drupal\graphql\Plugin\MenuLink\DeriverCode
public function getDerivativeDefinitions($basePluginDefinition) {
foreach ($this->schemaManager
->getDefinitions() as $key => $definition) {
$this->derivatives[$key] = [
'route_name' => "graphql.voyager.{$key}",
] + $basePluginDefinition;
}
return $this->derivatives;
}