1.20.x language_layout_access.inc LanguageLayoutAccess::form(&$form, &$form_state)

Settings form for configuring this access item.

Overrides LayoutAccess::form

File

modules/layout/plugins/access/language_layout_access.inc, line 57
Plugin to provide access control based upon the current site language.

Class

LanguageLayoutAccess

Code

function form(&$form, &$form_state) {
  parent::form($form, $form_state);
  $options = array(
    'default' => t('Default site language'),
  );
  $options += language_list(FALSE, TRUE);
  $form['language'] = array(
    '#title' => t('Language'),
    '#type' => 'checkboxes',
    '#options' => $options,
    '#description' => t('Pass only if the current site language is one of the selected languages.'),
    '#default_value' => $this->settings['language'],
  );
}