LocalActionTest.php

Same filename in this branch
  1. 9 core/modules/system/tests/src/Functional/Menu/LocalActionTest.php
Same filename in other branches
  1. 8.9.x core/modules/system/tests/src/Functional/Menu/LocalActionTest.php
  2. 8.9.x core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalActionTest.php
  3. 10 core/modules/system/tests/src/Functional/Menu/LocalActionTest.php
  4. 10 core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalActionTest.php
  5. 11.x core/modules/system/tests/src/Functional/Menu/LocalActionTest.php
  6. 11.x core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalActionTest.php

Namespace

Drupal\menu_test\Plugin\Derivative

File

core/modules/system/tests/modules/menu_test/src/Plugin/Derivative/LocalActionTest.php

View source
<?php

namespace Drupal\menu_test\Plugin\Derivative;

use Drupal\Component\Plugin\Derivative\DeriverBase;

/**
 * Test derivative to check local action title escaping.
 *
 * @see \Drupal\system\Tests\Menu\LocalActionTest
 */
class LocalActionTest extends DeriverBase {
    
    /**
     * {@inheritdoc}
     */
    public function getDerivativeDefinitions($base_plugin_definition) {
        $this->derivatives['example'] = $base_plugin_definition + [
            'title' => "<script>alert('Welcome to the derived jungle!')</script>",
        ];
        return $this->derivatives;
    }

}

Classes

Title Deprecated Summary
LocalActionTest Test derivative to check local action title escaping.

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.