function _entityform_add_rules_component_alter in Entityform 7
3 calls to _entityform_add_rules_component_alter()
- entityform_form_entityform_add_access_rule_form_alter in ./
entityform.module - Implements hook_form_FORM_ID_alter().
- entityform_form_entityform_add_submission_rule_form_alter in ./
entityform.module - Implements hook_form_FORM_ID_alter().
- entityform_form_entityform_add_validation_rule_form_alter in ./
entityform.module - Implements hook_form_FORM_ID_alter().
File
- ./
entityform.module, line 1768 - Module for the Entityform Entity - a starting point to create your own Entity and associated administration interface
Code
function _entityform_add_rules_component_alter(&$form, $tags, $component_types = NULL) {
$form['settings']['tags'] = array(
'#type' => 'value',
'#value' => $tags,
);
if ($component_types && !empty($form['plugin_name']['#options'])) {
foreach ($form['plugin_name']['#options'] as $key => $value) {
if (!in_array($key, $component_types)) {
unset($form['plugin_name']['#options'][$key]);
}
}
}
$var_items[] = array(
'type' => 'entityform',
'label' => 'Submitted Entityform',
'name' => 'entityform',
'usage' => '10',
// Parameter var. Why is this not defined as constant in Rules
'weight' => 1,
);
$var_items[] = array(
'type' => 'entityform_type',
'label' => 'Entityform Type',
'name' => 'entityform_type',
'usage' => '10',
// Parameter var. Why is this not defined as constant in Rules
'weight' => 2,
);
$form['settings']['vars'] = array(
'#type' => 'value',
'#value' => array(
'items' => $var_items,
),
);
}