You are here

public function BookOutlineStorage::countOriginalLinkChildren in Drupal 9

Same name and namespace in other branches
  1. 8 core/modules/book/src/BookOutlineStorage.php \Drupal\book\BookOutlineStorage::countOriginalLinkChildren()

Count the number of original link children.

Parameters

array $original: The book link array.

Return value

int Number of children.

Overrides BookOutlineStorageInterface::countOriginalLinkChildren

File

core/modules/book/src/BookOutlineStorage.php, line 176

Class

BookOutlineStorage
Defines a storage class for books outline.

Namespace

Drupal\book

Code

public function countOriginalLinkChildren($original) {
  return $this->connection
    ->select('book', 'b')
    ->condition('bid', $original['bid'])
    ->condition('pid', $original['pid'])
    ->condition('nid', $original['nid'], '<>')
    ->countQuery()
    ->execute()
    ->fetchField();
}