function contexturl_condition_url::options_form in Context URL 7
options_form function
Overrides context_condition::options_form
File
- plugins/
contexturl_condition_url.inc, line 38 - Adds url argument condition to Context
Class
- contexturl_condition_url
- URL as a Context condition.
Code
function options_form($context) {
$defaults = $this
->fetch_from_context($context, 'options');
return array(
'evaluationtype' => array(
'#type' => 'select',
'#title' => t('Select the function for URL pattern evaluation'),
'#description' => t('Select the function for URL pattern evaluation.'),
'#options' => array(
'fnmatch' => t('fnmatch'),
'preg_match' => t('preg_match'),
),
'#default_value' => isset($defaults['evaluationtype']) ? $defaults['evaluationtype'] : 1,
),
'pageurl' => array(
'#type' => 'textarea',
'#title' => t('Page URL'),
'#description' => t('Enter the URL formulas. Put each formula on a separate line. You can use the * character (asterisk) and any other pattern of the PHP fnmatch function and the ~ character (tilde) to exlcude one or more URL.'),
'#default_value' => isset($defaults['pageurl']) ? $defaults['pageurl'] : '',
),
);
}