public function DynamicUserHelpLink::getDerivativeDefinitions in Lightweight Directory Access Protocol (LDAP) 8.4
Same name and namespace in other branches
- 8.3 ldap_authentication/src/Plugin/Derivative/DynamicUserHelpLink.php \Drupal\ldap_authentication\Plugin\Derivative\DynamicUserHelpLink::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
- ldap_authentication/
src/ Plugin/ Derivative/ DynamicUserHelpLink.php, line 44
Class
- DynamicUserHelpLink
- Provides help messages for users when configured.
Namespace
Drupal\ldap_authentication\Plugin\DerivativeCode
public function getDerivativeDefinitions($basePluginDefinition) : array {
if ($this->config
->get('ldapUserHelpLinkText') && $this->config
->get('ldapUserHelpLinkUrl')) {
$basePluginDefinition['title'] = $this->config
->get('ldapUserHelpLinkText');
$basePluginDefinition['route_name'] = 'ldap_authentication.ldap_help_redirect';
$this->derivatives['ldap_authentication.show_user_help_link'] = $basePluginDefinition;
}
return $this->derivatives;
}