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

Breadcrumb

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

function Comment::jsonSerialize

Same name in this branch
  1. 11.1.x vendor/nikic/php-parser/lib/PhpParser/Comment.php \PhpParser\Comment::jsonSerialize()

Returns a serializable version of the node

Return value

array

Overrides Node::jsonSerialize

File

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

Class

Comment
A node that represents a comment.

Namespace

Peast\Syntax\Node

Code

public function jsonSerialize() {
    $ret = parent::jsonSerialize();
    unset($ret["leadingComments"]);
    unset($ret["trailingComments"]);
    return $ret;
}

API Navigation

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