public function ExplorerMenuLinkDeriver::getDerivativeDefinitions in GraphQL 8.3
Same name and namespace in other branches
- 8.4 src/Plugin/MenuLink/Deriver/ExplorerMenuLinkDeriver.php \Drupal\graphql\Plugin\MenuLink\Deriver\ExplorerMenuLinkDeriver::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/ ExplorerMenuLinkDeriver.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.explorer.{$key}",
] + $basePluginDefinition;
}
return $this->derivatives;
}