You are here

public function DynamicLocalTasks::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/DynamicLocalTasks.php, line 14

Class

DynamicLocalTasks
Defines dynamic local tasks.

Namespace

Drupal\campaignmonitor_user\Plugin\Deriver

Code

public function getDerivativeDefinitions($base_plugin_definition) {

  // Implement dynamic logic to provide values for the edit tab.
  $this->derivatives['campaignmonitor.user.campaignmonitor_edit_subscriptions_form'] = $base_plugin_definition;
  $this->derivatives['campaignmonitor.user.campaignmonitor_edit_subscriptions_form']['title'] = "Edit";
  $this->derivatives['campaignmonitor.user.campaignmonitor_edit_subscriptions_form']['base_route'] = "campaignmonitor.user.subscriptions";
  $this->derivatives['campaignmonitor.user.campaignmonitor_edit_subscriptions_form']['route_parameters']['user'] = 1;
  $this->derivatives['campaignmonitor.user.campaignmonitor_edit_subscriptions_form']['route_name'] = 'campaignmonitor.user.subscriptions_edit';
  return $this->derivatives;
}