function rules_condition_url_has_alias_form in Rules 6
@file Rules configuration forms for the path module
Related topics
File
- rules/
modules/ path.rules_forms.inc, line 11 - Rules configuration forms for the path module
Code
function rules_condition_url_has_alias_form($settings, &$form) {
$settings += array(
'src' => '',
'language' => '',
);
$form['settings']['src'] = array(
'#type' => 'textfield',
'#title' => t('Existing system path'),
'#default_value' => $settings['src'],
'#maxlength' => 256,
'#description' => t('Specify the existing path for which you want to check if an URL alias exists.'),
'#field_prefix' => url('', array(
'absolute' => TRUE,
)) . (variable_get('clean_url', 0) ? '' : '?q='),
'#required' => TRUE,
);
if (module_exists('locale')) {
$form['settings']['language'] = array(
'#type' => 'select',
'#title' => t('Language'),
'#default_value' => $settings['language'],
'#options' => array(
'' => '',
) + locale_language_list(),
'#description' => t('Optionally only check for a language specific path alias.'),
);
}
}