LocalActionTest.php in Drupal 9
File
core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalActionTest.php
View source
<?php
namespace Drupal\menu_test\Plugin\Derivative;
use Drupal\Component\Plugin\Derivative\DeriverBase;
class LocalActionTest extends DeriverBase {
public function getDerivativeDefinitions($base_plugin_definition) {
$this->derivatives['example'] = $base_plugin_definition + [
'title' => "<script>alert('Welcome to the derived jungle!')</script>",
];
return $this->derivatives;
}
}