You are here

public function DevelEntityTestLocalTasks::getDerivativeDefinitions in Devel 8.3

Same name and namespace in other branches
  1. 8 tests/modules/devel_entity_test/src/Plugin/Derivative/DevelEntityTestLocalTasks.php \Drupal\devel_entity_test\Plugin\Derivative\DevelEntityTestLocalTasks::getDerivativeDefinitions()
  2. 8.2 tests/modules/devel_entity_test/src/Plugin/Derivative/DevelEntityTestLocalTasks.php \Drupal\devel_entity_test\Plugin\Derivative\DevelEntityTestLocalTasks::getDerivativeDefinitions()
  3. 4.x tests/modules/devel_entity_test/src/Plugin/Derivative/DevelEntityTestLocalTasks.php \Drupal\devel_entity_test\Plugin\Derivative\DevelEntityTestLocalTasks::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

tests/modules/devel_entity_test/src/Plugin/Derivative/DevelEntityTestLocalTasks.php, line 15

Class

DevelEntityTestLocalTasks
Defines the local tasks for all the entity_test entities.

Namespace

Drupal\devel_entity_test\Plugin\Derivative

Code

public function getDerivativeDefinitions($base_plugin_definition) {
  $this->derivatives = [];
  $this->derivatives['devel_entity_test_canonical.canonical'] = [];
  $this->derivatives['devel_entity_test_canonical.canonical']['base_route'] = "entity.devel_entity_test_canonical.canonical";
  $this->derivatives['devel_entity_test_canonical.canonical']['route_name'] = "entity.devel_entity_test_canonical.canonical";
  $this->derivatives['devel_entity_test_canonical.canonical']['title'] = 'View';
  $this->derivatives['devel_entity_test_edit.edit'] = [];
  $this->derivatives['devel_entity_test_edit.edit']['base_route'] = "entity.devel_entity_test_edit.edit_form";
  $this->derivatives['devel_entity_test_edit.edit']['route_name'] = "entity.devel_entity_test_edit.edit_form";
  $this->derivatives['devel_entity_test_edit.edit']['title'] = 'Edit';
  return parent::getDerivativeDefinitions($base_plugin_definition);
}