function MenuLinkTestWithUnsafeTitle::getDerivativeDefinitions
Same name in other branches
- 9 core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/MenuLinkTestWithUnsafeTitle.php \Drupal\menu_test\Plugin\Derivative\MenuLinkTestWithUnsafeTitle::getDerivativeDefinitions()
- 8.9.x core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/MenuLinkTestWithUnsafeTitle.php \Drupal\menu_test\Plugin\Derivative\MenuLinkTestWithUnsafeTitle::getDerivativeDefinitions()
- 11.x core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/MenuLinkTestWithUnsafeTitle.php \Drupal\menu_test\Plugin\Derivative\MenuLinkTestWithUnsafeTitle::getDerivativeDefinitions()
Overrides DeriverBase::getDerivativeDefinitions
File
-
core/
modules/ system/ tests/ modules/ menu_test/ src/ Plugin/ Derivative/ MenuLinkTestWithUnsafeTitle.php, line 15
Class
- MenuLinkTestWithUnsafeTitle
- Test derivative with an unsafe string.
Namespace
Drupal\menu_test\Plugin\DerivativeCode
public function getDerivativeDefinitions($base_plugin_definition) {
$this->derivatives['unsafe'] = [
'title' => '<script>alert("Even more wild animals")</script>',
'menu_name' => 'tools',
] + $base_plugin_definition;
return $this->derivatives;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.