public function LocalActionTest::getDerivativeDefinitions in Drupal 8
Same name and namespace in other branches
- 9 core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalActionTest.php \Drupal\menu_test\Plugin\Derivative\LocalActionTest::getDerivativeDefinitions()
- 10 core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalActionTest.php \Drupal\menu_test\Plugin\Derivative\LocalActionTest::getDerivativeDefinitions()
Gets the definition of all derivatives of a base plugin.
Parameters
array $base_plugin_definition: The definition array of the base plugin.
Return value
array An array of full derivative definitions keyed on derivative id.
Overrides DeriverBase::getDerivativeDefinitions
See also
getDerivativeDefinition()
File
- core/
modules/ system/ tests/ modules/ menu_test/ src/ Plugin/ Derivative/ LocalActionTest.php, line 17
Class
- LocalActionTest
- Test derivative to check local action title escaping.
Namespace
Drupal\menu_test\Plugin\DerivativeCode
public function getDerivativeDefinitions($base_plugin_definition) {
$this->derivatives['example'] = $base_plugin_definition + [
'title' => "<script>alert('Welcome to the derived jungle!')</script>",
];
return $this->derivatives;
}