1 path_layout_access.inc PathLayoutAccess::form(&$form, &$form_state)

Settings form for configuring this access item.

Overrides LayoutAccess::form

File

core/modules/layout/plugins/access/path_layout_access.inc, line 59
Plugin to provide access control/visibility based on path.

Class

PathLayoutAccess
@file Plugin to provide access control/visibility based on path.

Code

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

  $form['visibility_setting'] = array(
    '#type' => 'radios',
    '#options' => array(
      1 => t('Allow access on the following pages'),
      0 => t('Allow access on all pages except the following pages'),
    ),
    '#default_value' => $this->settings['visibility_setting'],
  );
  $form['paths'] = array(
    '#type' => 'textarea',
    '#title' => t('Paths'),
    '#default_value' => $this->settings['paths'],
    '#description' => t('Enter one path per line. The "*" character is a wildcard. Example paths are "node/1" for an individual piece of content or "node/*" for every piece of content. "@front" is the home page.', array('@front' => '<front>')),
    '#required' => TRUE,
  );
}