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

Breadcrumb

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

function AbstractUnary::compile

Overrides Node::compile

File

vendor/twig/twig/src/Node/Expression/Unary/AbstractUnary.php, line 33

Class

AbstractUnary

Namespace

Twig\Node\Expression\Unary

Code

public function compile(Compiler $compiler) : void {
    if ($this->hasExplicitParentheses()) {
        $compiler->raw('(');
    }
    else {
        $compiler->raw(' ');
    }
    $this->operator($compiler);
    $compiler->subcompile($this->getNode('node'));
    if ($this->hasExplicitParentheses()) {
        $compiler->raw(')');
    }
}

API Navigation

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