function CommentStorage::getChildCids
Gets the comment ids of the passed comment entities' children.
Parameters
\Drupal\comment\CommentInterface[] $comments: An array of comment entities keyed by their ids.
Return value
array The entity ids of the passed comment entities' children as an array.
Overrides CommentStorageInterface::getChildCids
File
- 
              core/modules/ comment/ src/ CommentStorage.php, line 210 
Class
- CommentStorage
- Defines the storage handler class for comments.
Namespace
Drupal\commentCode
public function getChildCids(array $comments) {
  return $this->database
    ->select($this->getDataTable(), 'c')
    ->fields('c', [
    'cid',
  ])
    ->condition('pid', array_keys($comments), 'IN')
    ->condition('default_langcode', 1)
    ->execute()
    ->fetchCol();
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
