function entityform_forms in Entityform 7
Same name and namespace in other branches
- 7.2 entityform.module \entityform_forms()
Implements hook_forms().
File
- ./
entityform.module, line 1574 - Module for the Entityform Entity - a starting point to create your own Entity and associated administration interface
Code
function entityform_forms() {
$types = entityform_get_types();
$forms = array();
foreach ($types as $machine_name => $type) {
$forms[$machine_name . '_entityform_edit_form'] = array(
'callback' => 'entityform_edit_form',
);
}
// Make a different form id to each Rule Add form by Entityform Types
// @todo Should there be 1 for editing Rules
$rule_types = _entityform_get_rule_types();
foreach ($rule_types as $rule_type) {
$forms["entityform_add_{$rule_type}_rule_form"] = array(
'callback' => 'rules_admin_add_component',
);
}
return $forms;
}