private function FormModeManagerLocalTasks::setFormModesTasksBase 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::setFormModesTasksBase()
Set a Specific local tasks to `user.page` pages (register).
@TODO Use EntityRoutingMap to format an entity generic route_name. @TODO Use EntityRoutingMap to retrieve parent_id route_name.
Parameters
array $form_mode: An associative array represent a DisplayForm entity.
string $entity_type_id: The entity type ID.
1 call to FormModeManagerLocalTasks::setFormModesTasksBase()
- FormModeManagerLocalTasks::setFormModesTasks in src/
Plugin/ Derivative/ FormModeManagerLocalTasks.php - Set the default tasks on each entities.
File
- src/
Plugin/ Derivative/ FormModeManagerLocalTasks.php, line 187
Class
- FormModeManagerLocalTasks
- Defines dynamic 'Form Mode Manager' local tasks.
Namespace
Drupal\form_mode_manager\Plugin\DerivativeCode
private function setFormModesTasksBase(array $form_mode, $entity_type_id) {
$this->derivatives["form_mode_manager.{$form_mode['id']}.task_tab"] = [
'route_name' => "entity.{$entity_type_id}.edit_form.{$this->formModeManager->getFormModeMachineName($form_mode['id'])}",
'title' => $this
->t('Edit as @form_mode', [
'@form_mode' => $form_mode['label'],
]),
'parent_id' => "entity.{$entity_type_id}.edit_form",
'cache_tags' => $this->cacheTags,
];
}