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

Breadcrumb

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

function ClassConst::addConst

Add another constant to const group

Parameters

string|Identifier $name Name:

Node\Expr|bool|null|int|float|string|array|\UnitEnum $value Value:

Return value

$this The builder instance (for fluid interface)

File

vendor/nikic/php-parser/lib/PhpParser/Builder/ClassConst.php, line 45

Class

ClassConst

Namespace

PhpParser\Builder

Code

public function addConst($name, $value) {
    $this->constants[] = new Const_($name, BuilderHelpers::normalizeValue($value));
    return $this;
}

API Navigation

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