public function SmsUserMenuLink::getDerivativeDefinitions in SMS Framework 8
Same name and namespace in other branches
- 2.x modules/sms_user/src/Plugin/Derivative/SmsUserMenuLink.php \Drupal\sms_user\Plugin\Derivative\SmsUserMenuLink::getDerivativeDefinitions()
- 2.1.x modules/sms_user/src/Plugin/Derivative/SmsUserMenuLink.php \Drupal\sms_user\Plugin\Derivative\SmsUserMenuLink::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
- modules/
sms_user/ src/ Plugin/ Derivative/ SmsUserMenuLink.php, line 46
Class
- SmsUserMenuLink
- Provides dynamic menu links for SMS User.
Namespace
Drupal\sms_user\Plugin\DerivativeCode
public function getDerivativeDefinitions($base_plugin_definition) {
$links = [];
if ($this->phoneNumberVerification
->getPhoneNumberSettings('user', 'user')) {
$links['sms_user_phone_number_settings'] = [
'title' => t('User phone number'),
'description' => t('Set up phone number fields and settings for users.'),
'route_name' => 'entity.phone_number_settings.edit_form',
'route_parameters' => [
'phone_number_settings' => 'user.user',
],
'parent' => 'user.admin_index',
'weight' => 21,
];
}
return $links;
}