class DynamicUserHelpLink in Lightweight Directory Access Protocol (LDAP) 8.3
Same name and namespace in other branches
- 8.4 ldap_authentication/src/Plugin/Derivative/DynamicUserHelpLink.php \Drupal\ldap_authentication\Plugin\Derivative\DynamicUserHelpLink
Provides help messages for users when configured.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\ldap_authentication\Plugin\Derivative\DynamicUserHelpLink
Expanded class hierarchy of DynamicUserHelpLink
1 string reference to 'DynamicUserHelpLink'
- ldap_authentication.links.task.yml in ldap_authentication/
ldap_authentication.links.task.yml - ldap_authentication/ldap_authentication.links.task.yml
File
- ldap_authentication/
src/ Plugin/ Derivative/ DynamicUserHelpLink.php, line 10
Namespace
Drupal\ldap_authentication\Plugin\DerivativeView source
class DynamicUserHelpLink extends DeriverBase {
private $config;
/**
* Constructor.
*/
public function __construct() {
$this->config = \Drupal::config('ldap_authentication.settings');
}
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($basePluginDefinition) {
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
DynamicUserHelpLink:: |
private | property | ||
DynamicUserHelpLink:: |
public | function |
Gets the definition of all derivatives of a base plugin. Overrides DeriverBase:: |
|
DynamicUserHelpLink:: |
public | function | Constructor. |