You are here

protected function MongodbMenuTreeStorage::getChildrenQuery in MongoDB 8

Returns a query to find the children of a link but not the link itself.

Parameters

$link:

Return value

array

2 calls to MongodbMenuTreeStorage::getChildrenQuery()
MongodbMenuTreeStorage::getAllChildIds in src/MongodbMenuTreeStorage.php
Loads all the IDs for menu links that are below the given ID.
MongodbMenuTreeStorage::moveChildren in src/MongodbMenuTreeStorage.php
Re-parents a link's children when the link itself is moved.

File

src/MongodbMenuTreeStorage.php, line 420
Contains \Drupal\mongodb\MongodbMenuTreeStorage .

Class

MongodbMenuTreeStorage

Namespace

Drupal\mongodb

Code

protected function getChildrenQuery($link) {
  $query['value.menu_name'] = $link['menu_name'];
  $query['value.p'] = new \MongoRegex('/^' . preg_quote($link['p'], '/') . './');
  return $query;
}