1 entity_id_layout_access.inc EntityIDLayoutAccess::form(&$form, &$form_state)

Settings form for configuring this access item.

Overrides LayoutAccessNegatable::form

File

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

Class

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

Code

function form(&$form, &$form_state) {
  parent::form($form, $form_state);

  $form['entity_id'] = array(
    '#title' => t('@entity @entity_id_key is', array('@entity' => $this->entity_info['label'], '@entity_id_key' => strtoupper($this->entity_info['entity keys']['id']))),
    '#type' => 'textfield',
    '#default_value' => is_null($this->settings['entity_id']) ? NULL : (int) $this->settings['entity_id'],
    '#weight' => 100,
  );
}