public function OpenIDConnectAddLinks::getDerivativeDefinitions in OpenID Connect / OAuth client 2.x
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/ Derivative/ OpenIDConnectAddLinks.php, line 44
Class
- OpenIDConnectAddLinks
- Defines dynamic local tasks.
Namespace
Drupal\openid_connect\Plugin\DerivativeCode
public function getDerivativeDefinitions($base_plugin_definition) : array {
$plugins = $this->pluginManager
->getDefinitions();
ksort($plugins);
foreach ($plugins as $plugin_id => $plugin_definition) {
$key = 'entity.openid_connect_client.add_form.' . $plugin_id;
$this->derivatives[$key] = $base_plugin_definition;
$this->derivatives[$key]['title'] = $plugin_definition['label'];
$this->derivatives[$key]['route_name'] = 'entity.openid_connect_client.add_form';
$this->derivatives[$key]['route_parameters']['plugin_id'] = $plugin_id;
}
return $this->derivatives;
}