function TwigSandboxTest::getTwigEntityDangerousMethods

Same name in other branches
  1. 8.9.x core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php \Drupal\Tests\Core\Template\TwigSandboxTest::getTwigEntityDangerousMethods()
  2. 10 core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php \Drupal\Tests\Core\Template\TwigSandboxTest::getTwigEntityDangerousMethods()
  3. 11.x core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php \Drupal\Tests\Core\Template\TwigSandboxTest::getTwigEntityDangerousMethods()

Data provider for ::testEntityDangerousMethods.

Return value

array

File

core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php, line 63

Class

TwigSandboxTest
Tests the twig sandbox policy.

Namespace

Drupal\Tests\Core\Template

Code

public function getTwigEntityDangerousMethods() {
    return [
        [
            '{{ entity.delete }}',
        ],
        [
            '{{ entity.save }}',
        ],
        [
            '{{ entity.create }}',
        ],
    ];
}

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