3 namespace Drupal\menu_test\Plugin\Derivative;
5 use Drupal\Component\Plugin\Derivative\DeriverBase;
8 * Test derivative with an unsafe string.
10 class MenuLinkTestWithUnsafeTitle extends DeriverBase {
15 public function getDerivativeDefinitions($base_plugin_definition) {
16 $this->derivatives['unsafe'] = [
17 'title' => '<script>alert("Even more wild animals")</script>',
18 'menu_name' => 'tools',
19 ] + $base_plugin_definition;
21 return $this->derivatives;