1 entity_id_layout_access.inc EntityIDLayoutAccess::__construct($plugin_name, array $data = array())

Constructor for a Layout access rule.

Overrides LayoutAccessNegatable::__construct

File

core/modules/layout/plugins/access/entity_id_layout_access.inc, line 10
Plugin to provide access control based upon entity ID.

Class

EntityIDLayoutAccess
@file Plugin to provide access control based upon entity ID.

Code

function __construct($plugin_name, array $data = array()) {
  parent::__construct($plugin_name, $data);
  $this->settings += array(
    'entity_id' => NULL
  );

  // Set entity info.
  $info = layout_get_access_info($plugin_name);
  $this->entity_type = $info['entity_type'];
  $this->entity_info = entity_get_info($this->entity_type);
}