function TwigSandboxTest::getTwigEntityDangerousMethods

Same name in other branches
  1. 9 core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php \Drupal\Tests\Core\Template\TwigSandboxTest::getTwigEntityDangerousMethods()
  2. 8.9.x core/tests/Drupal/Tests/Core/Template/TwigSandboxTest.php \Drupal\Tests\Core\Template\TwigSandboxTest::getTwigEntityDangerousMethods()
  3. 10 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 61

Class

TwigSandboxTest
Tests the twig sandbox policy.

Namespace

Drupal\Tests\Core\Template

Code

public static 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.