LocalTaskTestWithUnsafeTitle.php
Same filename in other branches
- 9 core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalTaskTestWithUnsafeTitle.php
- 8.9.x core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalTaskTestWithUnsafeTitle.php
- 11.x core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalTaskTestWithUnsafeTitle.php
Namespace
Drupal\menu_test\Plugin\DerivativeFile
-
core/
modules/ system/ tests/ modules/ menu_test/ src/ Plugin/ Derivative/ LocalTaskTestWithUnsafeTitle.php
View source
<?php
namespace Drupal\menu_test\Plugin\Derivative;
use Drupal\Component\Plugin\Derivative\DeriverBase;
/**
* Test derivative to check local task title escaping.
*
* @see \Drupal\system\Tests\Menu\LocalTasksTest
*/
class LocalTaskTestWithUnsafeTitle extends DeriverBase {
/**
* {@inheritdoc}
*/
public function getDerivativeDefinitions($base_plugin_definition) {
$this->derivatives['unsafe'] = [
'title' => "<script>alert('Welcome to the derived jungle!')</script>",
'route_parameters' => [
'bar' => 'unsafe',
],
] + $base_plugin_definition;
return $this->derivatives;
}
}
Classes
Title | Deprecated | Summary |
---|---|---|
LocalTaskTestWithUnsafeTitle | Test derivative to check local task title escaping. |
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.