You are here

public function DynamicMenuLinks::getDerivativeDefinitions in Campaign Monitor 8

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/campaignmonitor_user/src/Plugin/Deriver/DynamicMenuLinks.php, line 33

Class

DynamicMenuLinks
Provides a deriver for user entered paths of menu links.

Namespace

Drupal\campaignmonitor_user\Plugin\Deriver

Code

public function getDerivativeDefinitions($base_plugin_definition) {
  $config = \Drupal::config('campaignmonitor_user.settings');
  $links = array(
    'route_name' => 'campaignmonitor.user.subscriptions',
    'id' => 'campaignmonitor_user.subscriptions',
  );
  $links['title'] = $config
    ->get('subscription_heading');
  $links['description'] = 'Subscribe to Campaign Monitor';
  $links['parent'] = 'main:';
  $links['enabled'] = 1;
  return $links;
}