Loading src/Plugin/Derivative/AddContentLocalActions.php +2 −1 Changes for src/Plugin/Derivative/AddContentLocalActions.php: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ namespace Drupal\tasty_backend\Plugin\Derivative; use Drupal\Component\Plugin\Derivative\DeriverBase; use Drupal\Component\Utility\Unicode; /** * Defines node/add/{type} local tasks for each content type. Loading @@ -21,7 +22,7 @@ class AddContentLocalActions extends DeriverBase { $content_types = \Drupal::entityTypeManager()->getStorage('node_type')->loadMultiple(); foreach ($content_types as $content_type) { $this->derivatives['tasty_backend.node_add_' . $content_type->id()] = $base_plugin_definition; $this->derivatives['tasty_backend.node_add_' . $content_type->id()]['title'] = 'Add ' . strtolower($content_type->label()); $this->derivatives['tasty_backend.node_add_' . $content_type->id()]['title'] = 'Add ' . Unicode::strtolower($content_type->label()); $this->derivatives['tasty_backend.node_add_' . $content_type->id()]['route_name'] = 'node.add'; $this->derivatives['tasty_backend.node_add_' . $content_type->id()]['route_parameters']['node_type'] = $content_type->id(); $this->derivatives['tasty_backend.node_add_' . $content_type->id()]['appears_on'][] = 'view.tb_manage_content_' . $content_type->id() . '.page_1'; Loading Loading
src/Plugin/Derivative/AddContentLocalActions.php +2 −1 Changes for src/Plugin/Derivative/AddContentLocalActions.php: 2 added lines, 1 removed line. Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ namespace Drupal\tasty_backend\Plugin\Derivative; use Drupal\Component\Plugin\Derivative\DeriverBase; use Drupal\Component\Utility\Unicode; /** * Defines node/add/{type} local tasks for each content type. Loading @@ -21,7 +22,7 @@ class AddContentLocalActions extends DeriverBase { $content_types = \Drupal::entityTypeManager()->getStorage('node_type')->loadMultiple(); foreach ($content_types as $content_type) { $this->derivatives['tasty_backend.node_add_' . $content_type->id()] = $base_plugin_definition; $this->derivatives['tasty_backend.node_add_' . $content_type->id()]['title'] = 'Add ' . strtolower($content_type->label()); $this->derivatives['tasty_backend.node_add_' . $content_type->id()]['title'] = 'Add ' . Unicode::strtolower($content_type->label()); $this->derivatives['tasty_backend.node_add_' . $content_type->id()]['route_name'] = 'node.add'; $this->derivatives['tasty_backend.node_add_' . $content_type->id()]['route_parameters']['node_type'] = $content_type->id(); $this->derivatives['tasty_backend.node_add_' . $content_type->id()]['appears_on'][] = 'view.tb_manage_content_' . $content_type->id() . '.page_1'; Loading