function rules_path_condition_info

Implements hook_rules_condition_info() on behalf of the path module.

Related topics

File

modules/path.rules.inc, line 119

Code

function rules_path_condition_info() {
    return array(
        'path_has_alias' => array(
            'label' => t('Path has URL alias'),
            'group' => t('Path'),
            'parameter' => array(
                'source' => array(
                    'type' => 'text',
                    'label' => t('Existing system path'),
                    'description' => t('Specifies the existing path you wish to check for. For example: node/28, forum/1, taxonomy/term/1+2.'),
                    'optional' => TRUE,
                ),
                'language' => array(
                    'type' => 'token',
                    'label' => t('Language'),
                    'description' => t('If specified, the language for which the URL alias applies.'),
                    'options list' => 'entity_metadata_language_list',
                    'optional' => TRUE,
                    'default value' => LANGUAGE_NONE,
                ),
            ),
            'base' => 'rules_condition_path_has_alias',
            'callbacks' => array(
                'dependencies' => 'rules_path_dependencies',
            ),
            'access callback' => 'rules_path_integration_access',
        ),
        'path_alias_exists' => array(
            'label' => t('URL alias exists'),
            'group' => t('Path'),
            'parameter' => array(
                'alias' => array(
                    'type' => 'text',
                    'label' => t('URL alias'),
                    'description' => t('Specify the URL alias to check for. For example, "about" for an about page.'),
                    'optional' => TRUE,
                    'cleaning callback' => 'rules_path_clean_replacement_values',
                ),
                'language' => array(
                    'type' => 'token',
                    'label' => t('Language'),
                    'description' => t('If specified, the language for which the URL alias applies.'),
                    'options list' => 'entity_metadata_language_list',
                    'optional' => TRUE,
                    'default value' => LANGUAGE_NONE,
                ),
            ),
            'base' => 'rules_condition_path_alias_exists',
            'callbacks' => array(
                'dependencies' => 'rules_path_dependencies',
            ),
            'access callback' => 'rules_path_integration_access',
        ),
    );
}