You are here

MenuBlock.php in Colossal Menu 2.x

Same filename in this branch
  1. 2.x src/Plugin/Derivative/MenuBlock.php
  2. 2.x src/Plugin/Block/MenuBlock.php
Same filename and directory in other branches
  1. 8 src/Plugin/Derivative/MenuBlock.php

File

src/Plugin/Derivative/MenuBlock.php
View source
<?php

namespace Drupal\colossal_menu\Plugin\Derivative;

use Drupal\system\Plugin\Derivative\SystemMenuBlock;
use Symfony\Component\DependencyInjection\ContainerInterface;

/**
 * Provides block plugin definitions for custom menus.
 *
 * @see \Drupal\colossal_menu\Plugin\Block\MenuBlock
 */
class MenuBlock extends SystemMenuBlock {

  /**
   * {@inheritdoc}
   */
  public static function create(ContainerInterface $container, $base_plugin_id) {
    return new static($container
      ->get('entity_type.manager')
      ->getStorage('colossal_menu'));
  }

}

Classes

Namesort descending Description
MenuBlock Provides block plugin definitions for custom menus.