Query::getComments

public &Query::getComments()

Returns a reference to the comments array for the query.

Because this method returns by reference, alter hooks may edit the comments array directly to make their changes. If just adding comments, however, the use of comment() is preferred.

Note that this method must be called by reference as well:

$comments =& $query->getComments();

Return value

array A reference to the comments array structure.

File

core/lib/Drupal/Core/Database/Query/Query.php, line 174

Class

Query
Base class for query builders.

Namespace

Drupal\Core\Database\Query

Code

public function &getComments() {
  return $this->comments;
}
doc_Drupal
2016-10-29 09:35:25
Comments
Leave a Comment

Please login to continue.