class LocalTaskTestWithUnsafeTitle in Zircon Profile 8
Same name and namespace in other branches
- 8.0 core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalTaskTestWithUnsafeTitle.php \Drupal\menu_test\Plugin\Derivative\LocalTaskTestWithUnsafeTitle
Test derivative to check local task title escaping.
Hierarchy
- class \Drupal\Component\Plugin\Derivative\DeriverBase implements DeriverInterface
- class \Drupal\menu_test\Plugin\Derivative\LocalTaskTestWithUnsafeTitle
Expanded class hierarchy of LocalTaskTestWithUnsafeTitle
See also
\Drupal\system\Tests\Menu\LocalTasksTest
1 string reference to 'LocalTaskTestWithUnsafeTitle'
- menu_test.links.task.yml in core/
modules/ system/ tests/ modules/ menu_test/ menu_test.links.task.yml - core/modules/system/tests/modules/menu_test/menu_test.links.task.yml
File
- core/
modules/ system/ tests/ modules/ menu_test/ src/ Plugin/ Derivative/ LocalTaskTestWithUnsafeTitle.php, line 17 - Contains \Drupal\menu_test\Plugin\Derivative\LocalTaskTestWithUnsafeTitle.
Namespace
Drupal\menu_test\Plugin\DerivativeView source
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;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DeriverBase:: |
protected | property | List of derivative definitions. | 1 |
DeriverBase:: |
public | function |
Gets the definition of a derivative plugin. Overrides DeriverInterface:: |
|
LocalTaskTestWithUnsafeTitle:: |
public | function |
@inheritDoc Overrides DeriverBase:: |