You are here

public function MenuTreeStorage::getAllChildIds in Colossal Menu 8

Same name and namespace in other branches
  1. 2.x src/Menu/MenuTreeStorage.php \Drupal\colossal_menu\Menu\MenuTreeStorage::getAllChildIds()

Loads all the IDs for menu links that are below the given ID.

Parameters

string $id: The parent menu link ID.

Return value

array An unordered array of plugin IDs corresponding to all children.

Overrides MenuTreeStorageInterface::getAllChildIds

File

src/Menu/MenuTreeStorage.php, line 290

Class

MenuTreeStorage
Provides a menu tree storage using the database.

Namespace

Drupal\colossal_menu\Menu

Code

public function getAllChildIds($id) {
  return $this->connection
    ->select($this->table, 't')
    ->fields('t', [
    'descendant',
  ])
    ->condition('t.ancestor', $id)
    ->execute()
    ->fetchCol();
}