function CommentStorage::getChildCids

Same name and namespace in other branches
  1. 9 core/modules/comment/src/CommentStorage.php \Drupal\comment\CommentStorage::getChildCids()
  2. 10 core/modules/comment/src/CommentStorage.php \Drupal\comment\CommentStorage::getChildCids()
  3. 11.x core/modules/comment/src/CommentStorage.php \Drupal\comment\CommentStorage::getChildCids()

Overrides CommentStorageInterface::getChildCids

File

core/modules/comment/src/CommentStorage.php, line 208

Class

CommentStorage
Defines the storage handler class for comments.

Namespace

Drupal\comment

Code

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.