src/Twig/TerrificCompiler.php
/**
   * Compiles NameExpression as a variable to access.
   *
   * @param \Twig\Node\Expression\NameExpression $expression
   *   The expression to compile.
   * @param string $contextVariable
   *   The PHP variable to use as base for adding the array keys.
   *   Defaults to the Terrific context.
   */
Compiles NameExpression as a variable to access.
@param \Twig\Node\Expression\NameExpression $expression
The expression to compile.
@param string $contextVariable
The PHP variable to use as base for adding the array keys.
Defaults to the Terrific context.
Compiles NameExpression as a variable to access . @param \ Twig \ Node \ Expression \ NameExpression $expression The expression to compile . @param string $contextVariable The PHP variable to use as base for adding the array keys . Defaults to the Terrific context .
public function compileNameExpressionAsContextVariable(NameExpression $expression, string $contextVariable = ContextProviderInterface::TERRIFIC_CONTEXT_VARIABLE): void {
    $variableName = $this->getExpressionHandler()->getVariableNameFromNameExpression($expression);
    $this->compileAsContextVariable(VariableNameAndArrayKeysPair::createVariable($variableName), $contextVariable);
  }
public function compileNameExpressionAsContextVariable ( NameExpression $ expression , string $ contextVariable = ContextProviderInterface :: TERRIFIC_CONTEXT_VARIABLE ) : void { $ variableName = $ this -> getExpressionHandler ( ) -> getVariableNameFromNameExpression ( $ expression ) ; $ this -> compileAsContextVariable ( VariableNameAndArrayKeysPair :: createVariable ( $ variableName ) , $ contextVariable ) ; }
Compiles NameExpression as a variable to access.
Compiles NameExpression as a variable to access .