You are here

protected function MenuBlock::getDerivativeActiveTrailIds in Menu Block 8

Gets an array of the active trail menu link items.

Return value

array The active trail menu item IDs.

3 calls to MenuBlock::getDerivativeActiveTrailIds()
MenuBlock::getActiveItemTitle in src/Plugin/Block/MenuBlock.php
Gets the active menu item's title.
MenuBlock::getActiveTrailParentTitle in src/Plugin/Block/MenuBlock.php
Gets the title of the parent of the active menu item.
MenuBlock::getActiveTrailRootTitle in src/Plugin/Block/MenuBlock.php
Gets the current menu item's root menu item title.

File

src/Plugin/Block/MenuBlock.php, line 504

Class

MenuBlock
Provides an extended Menu block.

Namespace

Drupal\menu_block\Plugin\Block

Code

protected function getDerivativeActiveTrailIds() {
  $menu_id = $this
    ->getDerivativeId();
  return array_filter($this->menuActiveTrail
    ->getActiveTrailIds($menu_id));
}