1.20.x block.overview_user.inc DashboardOverviewUserBlock::__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

modules/dashboard/includes/block.overview_user.inc, line 15
Dashboard block displaying information about user accounts, including:

Class

DashboardOverviewUserBlock
@file

Code

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

  $role_options = user_roles(TRUE);
  unset($role_options[BACKDROP_AUTHENTICATED_ROLE]);

  // Set defaults.
  $this->settings += array(
    'user_counts' => TRUE,
    'user_counts_active' => TRUE,
    'user_counts_blocked' => TRUE,
    'roles' => $role_options,
  );
}