TestLocalAction5.php in Drupal 8
File
core/modules/system/tests/modules/menu_test/src/Plugin/Menu/LocalAction/TestLocalAction5.php
View source
<?php
namespace Drupal\menu_test\Plugin\Menu\LocalAction;
use Drupal\Core\Menu\LocalActionDefault;
use Symfony\Component\HttpFoundation\Request;
class TestLocalAction5 extends LocalActionDefault {
public function getTitle(Request $request = NULL) {
return "<script>alert('Welcome to the jungle!')</script>";
}
}
Classes
Name |
Description |
TestLocalAction5 |
Defines a local action plugin with a dynamic title from user input. |