public function MenuBlock::build

Builds and returns the renderable array for this block plugin.

Return value

array A renderable array representing the content of the block.

Overrides SystemMenuBlock::build

See also

\Drupal\block\BlockRenderController

File

drupal/core/modules/menu/lib/Drupal/menu/Plugin/Block/MenuBlock.php, line 29
Contains \Drupal\menu\Plugin\Block\MenuBlock.

Class

MenuBlock
Provides a generic Menu block.

Namespace

Drupal\menu\Plugin\Block

Code

public function build() {
  list($plugin, $menu) = explode(':', $this
    ->getPluginId());
  return menu_tree($menu);
}