domain_rules.rules_forms.inc in Domain Rules 6
The forms for the rules
Standard definition via the Form API
File
domain_rules.rules_forms.incView source
<?php
/**
* @file
* The forms for the rules
*
* Standard definition via the Form API
*/
/**
* Action drupal message configuration form.
*/
function rules_action_create_domain_form($settings = array(), &$form) {
$form['settings']['sitename'] = array(
'#type' => 'textfield',
'#title' => t('Site name'),
'#default_value' => $settings['sitename'],
'#description' => t("The new domain site name."),
);
$form['settings']['subdomain'] = array(
'#type' => 'textfield',
'#title' => t('Domain address'),
'#default_value' => $settings['subdomain'],
'#description' => t("The new domain address"),
);
$form['settings']['domain_scheme'] = array(
'#type' => 'radios',
'#title' => t('Schema'),
'#default_value' => 0,
'#options' => array(
t('http'),
t('https'),
),
);
$form['settings']['valid'] = array(
'#type' => 'radios',
'#title' => t('Domain status'),
'#options' => array(
1 => t('Active'),
0 => t('Inactive'),
),
'#default_value' => 1,
);
}
function rules_action_delete_domain_form($settings = array(), &$form) {
$form['settings']['subdomain'] = array(
'#type' => 'textfield',
'#title' => t('Domain address'),
'#default_value' => $settings['subdomain'],
'#description' => t("The new domain address"),
);
}
function rules_action_set_user_defaults_domain_form($settings = array(), &$form) {
$form['settings']['subdomain'] = array(
'#type' => 'textfield',
'#title' => t('Domain address'),
'#default_value' => $settings['subdomain'],
'#description' => t("The new domain address"),
);
$form['settings']['state'] = array(
'#type' => 'radios',
'#title' => t('Domain state'),
'#options' => array(
1 => t('Active'),
0 => t('Inactive'),
),
'#default_value' => 1,
);
$form['settings']['role_id'] = array(
'#type' => 'textfield',
'#title' => t('Role ID'),
'#default_value' => $settings['role_id'],
'#description' => t("TODO: 0 for new user, 1 for Anonymous, 2 for Authenticated, and so on"),
);
}
function rules_action_set_node_domain_form($settings = array(), &$form) {
$form['settings']['subdomain'] = array(
'#type' => 'textfield',
'#title' => t('Domain address'),
'#default_value' => $settings['subdomain'],
'#description' => t("The domain address"),
);
}
function rules_action_set_domain_theme_form($settings = array(), &$form) {
$form['settings']['subdomain'] = array(
'#type' => 'textfield',
'#title' => t('Domain address'),
'#default_value' => $settings['subdomain'],
'#description' => t("The domain address"),
);
$form['settings']['theme'] = array(
'#type' => 'textfield',
'#title' => t('Theme'),
'#default_value' => $settings['theme'],
'#description' => t("The theme name"),
);
}
function rules_action_set_user_domain_form($settings = array(), &$form) {
$form['settings']['subdomain'] = array(
'#type' => 'textfield',
'#title' => t('Domain address'),
'#default_value' => $settings['subdomain'],
'#description' => t("The domain address"),
);
}
Functions
Name![]() |
Description |
---|---|
rules_action_create_domain_form | Action drupal message configuration form. |
rules_action_delete_domain_form | |
rules_action_set_domain_theme_form | |
rules_action_set_node_domain_form | |
rules_action_set_user_defaults_domain_form | |
rules_action_set_user_domain_form |