Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. NodeTestCase.php

function NodeTestCase::createVariableGetter

1 call to NodeTestCase::createVariableGetter()
NodeTestCase::getVariableGetter in vendor/twig/twig/src/Test/NodeTestCase.php

File

vendor/twig/twig/src/Test/NodeTestCase.php, line 94

Class

NodeTestCase

Namespace

Twig\Test

Code

protected static final function createVariableGetter(string $name, bool $line = false) : string {
    $line = $line > 0 ? "// line {$line}\n" : '';
    return \sprintf('%s($context["%s"] ?? null)', $line, $name);
}

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal