1 block.menus.inc DashboardMenuBlock::__construct($plugin_name, array $data)

Create a new Block object.

Parameters

string $plugin_name: The Layout plugin name. In the case of a block, this is a key identifying the block module, delta, and (if applicable) child delta, separated by colons.

array $data: Settings that provide current configuration of the block, such as access rules, style settings, block settings, etc.

Overrides Block::__construct

File

core/modules/dashboard/includes/block.menus.inc, line 10
Dashboard block displaying menus on the site.

Class

DashboardMenuBlock
@file Dashboard block displaying menus on the site.

Code

function __construct($plugin_name, array $data) {
  parent::__construct($plugin_name, $data);

  // Set defaults.
  $all_menus = module_exists('menu') ? array_keys(menu_get_menus()) : array();
  $excluded_menus = array('management', 'user-menu', 'devel');
  $this->settings += array(
    'menus' => array_diff($all_menus, $excluded_menus),
  );
}