function ctools_string_equal_ctools_access_settings

Settings form.

1 string reference to 'ctools_string_equal_ctools_access_settings'
string_equal.inc in plugins/access/string_equal.inc

File

plugins/access/string_equal.inc, line 21

Code

function ctools_string_equal_ctools_access_settings($form, &$form_state, $conf) {
    $form['settings']['operator'] = array(
        '#type' => 'radios',
        '#title' => t('Operator'),
        '#options' => array(
            '=' => t('Equal'),
            '!=' => t('Not equal'),
            'regex' => t('Regular expression'),
            '!regex' => t('Not equal to regular expression'),
        ),
        '#default_value' => $conf['operator'],
        '#description' => t('If using a regular expression, you should enclose the pattern in slashes like so: <em>/foo/</em>. If you need to compare against slashes you can use another character to enclose the pattern, such as @. See <a href="http://www.php.net/manual/en/reference.pcre.pattern.syntax.php">PHP regex documentation</a> for more.'),
    );
    $form['settings']['value'] = array(
        '#type' => 'textfield',
        '#title' => t('String'),
        '#default_value' => $conf['value'],
    );
    $form['settings']['case'] = array(
        '#type' => 'checkbox',
        '#title' => t('Case sensitive'),
        '#default_value' => $conf['case'],
    );
    return $form;
}