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

Breadcrumb

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

function Property::setShorthand

Sets the property shorthand flag that is true when the property is declared using an identifier and without a value

Parameters

bool $shorthand Property shorthand flag:

Return value

$this

File

vendor/mck89/peast/lib/Peast/Syntax/Node/Property.php, line 207

Class

Property
A node that represents a property in an object literal. For example "b" in: a = {b: 1}

Namespace

Peast\Syntax\Node

Code

public function setShorthand($shorthand) {
    $this->shorthand = (bool) $shorthand;
    return $this;
}
RSS feed
Powered by Drupal