You are here

private function EckEntityContentLocalTask::createDerivativeDefinition in Entity Construction Kit (ECK) 8

Creates a derivative definition.

Parameters

string $routeName: The route name.

int $weight: The weight.

string $title: The title.

string $base_route: The base route.

Return value

array The created derivative definition.

1 call to EckEntityContentLocalTask::createDerivativeDefinition()
EckEntityContentLocalTask::getDerivativeDefinitions in src/Plugin/Derivative/EckEntityContentLocalTask.php
Gets the definition of all derivatives of a base plugin.

File

src/Plugin/Derivative/EckEntityContentLocalTask.php, line 80

Class

EckEntityContentLocalTask
Provides local task definitions for all entity bundles.

Namespace

Drupal\eck\Plugin\Derivative

Code

private function createDerivativeDefinition($routeName, $weight, $title, $base_route) {
  $derivative = [
    'route_name' => $routeName,
    'weight' => $weight,
    'title' => $this
      ->t($title),
    'base_route' => $base_route,
  ] + $this->basePluginDefinition;
  return $derivative;
}