Version 1
[yaffs-website] / web / core / modules / system / tests / modules / menu_test / src / Plugin / Derivative / LocalActionTest.php
1 <?php
2
3 namespace Drupal\menu_test\Plugin\Derivative;
4
5 use Drupal\Component\Plugin\Derivative\DeriverBase;
6
7 /**
8  * Test derivative to check local action title escaping.
9  *
10  * @see \Drupal\system\Tests\Menu\LocalActionTest
11  */
12 class LocalActionTest extends DeriverBase {
13
14   /**
15    * {@inheritdoc}
16    */
17   public function getDerivativeDefinitions($base_plugin_definition) {
18     $this->derivatives['example'] = $base_plugin_definition + [
19       'title' => "<script>alert('Welcome to the derived jungle!')</script>",
20     ];
21
22     return $this->derivatives;
23   }
24
25 }