You are here

public function LocalActionTest::getDerivativeDefinitions in Zircon Profile 8.0

Same name and namespace in other branches
  1. 8 core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalActionTest.php \Drupal\menu_test\Plugin\Derivative\LocalActionTest::getDerivativeDefinitions()

@inheritDoc

Overrides DeriverBase::getDerivativeDefinitions

File

core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalActionTest.php, line 22
Contains \Drupal\menu_test\Plugin\Derivative\LocalActionTest.

Class

LocalActionTest
Test derivative to check local action title escaping.

Namespace

Drupal\menu_test\Plugin\Derivative

Code

public function getDerivativeDefinitions($base_plugin_definition) {
  $this->derivatives['example'] = $base_plugin_definition + [
    'title' => "<script>alert('Welcome to the derived jungle!')</script>",
  ];
  return $this->derivatives;
}