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

Breadcrumb

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

function ArrowFunctionExpression::setBody

Sets the function body

Parameters

BlockStatement|Expression $body Function body:

Return value

$this

Overrides Function_::setBody

File

vendor/mck89/peast/lib/Peast/Syntax/Node/ArrowFunctionExpression.php, line 43

Class

ArrowFunctionExpression
A node that represents an arrow function. For example: var fn = (a, b) => console.log(a, b)

Namespace

Peast\Syntax\Node

Code

public function setBody($body) {
    $this->assertType($body, array(
        "BlockStatement",
        "Expression",
    ));
    $this->body = $body;
    return $this;
}

API Navigation

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