You are here

private function FormModeManagerContextualLinks::setDefaultTasks in Form mode manager 8.2

Set the default Contextual link on each entities.

Parameters

string $entity_type_id: The entity type ID.

string $edit_route_name: The edit route name of given entity.

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

File

src/Plugin/Derivative/FormModeManagerContextualLinks.php, line 106

Class

FormModeManagerContextualLinks
Provides contextual links definitions for all entity bundles.

Namespace

Drupal\form_mode_manager\Plugin\Derivative

Code

private function setDefaultTasks($entity_type_id, $edit_route_name) {
  $this->derivatives[$edit_route_name] = [
    'route_name' => $edit_route_name,
    'title' => $this
      ->t('Edit as Default'),
    'group' => $entity_type_id,
    'cache_tags' => $this->cacheTags,
  ];
}