function ctools_string_length_ctools_access_settings

Settings form for the 'by role' access plugin.

1 string reference to 'ctools_string_length_ctools_access_settings'
string_length.inc in plugins/access/string_length.inc

File

plugins/access/string_length.inc, line 22

Code

function ctools_string_length_ctools_access_settings($form, &$form_state, $conf) {
  $form['settings']['operator'] = array(
    '#type' => 'radios',
    '#title' => t('Operator'),
    '#options' => array(
      '>' => t('Greater than'),
      '>=' => t('Greater than or equal to'),
      '=' => t('Equal to'),
      '!=' => t('Not equal to'),
      '<' => t('Less than'),
      '<=' => t('Less than or equal to'),
    ),
    '#default_value' => $conf['operator'],
  );
  $form['settings']['length'] = array(
    '#type' => 'textfield',
    '#title' => t('Length of string'),
    '#size' => 3,
    '#default_value' => $conf['length'],
    '#description' => t('Access/visibility will be granted based on string context length.'),
  );
  return $form;
}