BookOutlineStorage::countOriginalLinkChildren

public BookOutlineStorage::countOriginalLinkChildren($original)

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();
}
doc_Drupal
2016-10-29 08:48:24
Comments
Leave a Comment

Please login to continue.