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

Breadcrumb

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

function Ternary::__construct

Constructs a ternary operator node.

Parameters

Expr $cond Condition:

null|Expr $if Expression for true:

Expr $else Expression for false:

array<string, mixed> $attributes Additional attributes:

File

vendor/nikic/php-parser/lib/PhpParser/Node/Expr/Ternary.php, line 23

Class

Ternary

Namespace

PhpParser\Node\Expr

Code

public function __construct(Expr $cond, ?Expr $if, Expr $else, array $attributes = []) {
    $this->attributes = $attributes;
    $this->cond = $cond;
    $this->if = $if;
    $this->else = $else;
}
RSS feed
Powered by Drupal