3 namespace Drupal\menu_test\Plugin\Derivative;
5 use Drupal\Component\Plugin\Derivative\DeriverBase;
8 * Test derivative to check local task title escaping.
10 * @see \Drupal\system\Tests\Menu\LocalTasksTest
12 class LocalTaskTestWithUnsafeTitle extends DeriverBase {
17 public function getDerivativeDefinitions($base_plugin_definition) {
18 $this->derivatives['unsafe'] = [
19 'title' => "<script>alert('Welcome to the derived jungle!')</script>",
20 'route_parameters' => ['bar' => 'unsafe'],
21 ] + $base_plugin_definition;
23 return $this->derivatives;