function LocalTaskTestWithUnsafeTitle::getDerivativeDefinitions
Same name in other branches
- 9 core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalTaskTestWithUnsafeTitle.php \Drupal\menu_test\Plugin\Derivative\LocalTaskTestWithUnsafeTitle::getDerivativeDefinitions()
- 10 core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalTaskTestWithUnsafeTitle.php \Drupal\menu_test\Plugin\Derivative\LocalTaskTestWithUnsafeTitle::getDerivativeDefinitions()
- 11.x core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalTaskTestWithUnsafeTitle.php \Drupal\menu_test\Plugin\Derivative\LocalTaskTestWithUnsafeTitle::getDerivativeDefinitions()
Overrides DeriverBase::getDerivativeDefinitions
File
-
core/
modules/ system/ tests/ modules/ menu_test/ src/ Plugin/ Derivative/ LocalTaskTestWithUnsafeTitle.php, line 17
Class
- LocalTaskTestWithUnsafeTitle
- Test derivative to check local task title escaping.
Namespace
Drupal\menu_test\Plugin\DerivativeCode
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;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.