private function FormModeManagerLocalTasks::blockContentEnhancer in Form mode manager 8
Same name and namespace in other branches
- 8.2 src/Plugin/Derivative/FormModeManagerLocalTasks.php \Drupal\form_mode_manager\Plugin\Derivative\FormModeManagerLocalTasks::blockContentEnhancer()
Set a Specific local tasks parameters for block_content entity.
Parameters
string $element_name: Name of element to enhance.
string $entity_type_id: The definition of block_content tasks.
bool $is_default_task: Determine context of tasks (defaults or form mode manager) derivative.
2 calls to FormModeManagerLocalTasks::blockContentEnhancer()
- FormModeManagerLocalTasks::setDefaultTasks in src/
Plugin/ Derivative/ FormModeManagerLocalTasks.php - Set the default tasks on each entities.
- FormModeManagerLocalTasks::setFormModesTasks in src/
Plugin/ Derivative/ FormModeManagerLocalTasks.php - Set the default tasks on each entities.
File
- src/
Plugin/ Derivative/ FormModeManagerLocalTasks.php, line 96
Class
- FormModeManagerLocalTasks
- Defines dynamic 'Form Mode Manager' local tasks.
Namespace
Drupal\form_mode_manager\Plugin\DerivativeCode
private function blockContentEnhancer($element_name, $entity_type_id, $is_default_task = TRUE) {
if ('block_content' === $entity_type_id) {
if ($is_default_task) {
$this->derivatives[$element_name]['route_name'] = self::BLOCK_CONTENT_CANONICAL;
}
$this->derivatives[$element_name]['parent_id'] = self::BLOCK_CONTENT_CANONICAL;
}
}