private function FormModeManagerLocalTasks::setDefaultTasks in Form mode manager 8.2
Same name and namespace in other branches
- 8 src/Plugin/Derivative/FormModeManagerLocalTasks.php \Drupal\form_mode_manager\Plugin\Derivative\FormModeManagerLocalTasks::setDefaultTasks()
Set the default tasks on each entities.
@TODO Use EntityRoutingMap to format an entity generic route_name. @TODO Use EntityRoutingMap to retrieve parent_id route_name.
Parameters
string $entity_type_id: The entity type ID.
1 call to FormModeManagerLocalTasks::setDefaultTasks()
- FormModeManagerLocalTasks::getDerivativeDefinitions in src/
Plugin/ Derivative/ FormModeManagerLocalTasks.php - Gets the definition of all derivatives of a base plugin.
File
- src/
Plugin/ Derivative/ FormModeManagerLocalTasks.php, line 118
Class
- FormModeManagerLocalTasks
- Defines dynamic 'Form Mode Manager' local tasks.
Namespace
Drupal\form_mode_manager\Plugin\DerivativeCode
private function setDefaultTasks($entity_type_id) {
$this->derivatives["form_mode_manager.{$entity_type_id}.default.task_tab"] = [
'route_name' => "entity.{$entity_type_id}.edit_form",
'title' => $this
->t('Edit as Default'),
'parent_id' => "entity.{$entity_type_id}.edit_form",
'cache_tags' => $this->cacheTags,
];
$element_name = "form_mode_manager.{$entity_type_id}.default.task_tab";
$this
->blockContentEnhancer($element_name, $entity_type_id);
}