class EntityformTypeUIController in Entityform 7
Same name and namespace in other branches
- 7.2 entityform_type.admin.inc \EntityformTypeUIController
UI controller.
Hierarchy
- class \EntityDefaultUIController
- class \EntityformTypeUIController
Expanded class hierarchy of EntityformTypeUIController
1 string reference to 'EntityformTypeUIController'
- entityform_entity_info in ./
entityform.module - Implement hook_entity_info().
File
- ./
entityform_type.admin.inc, line 11 - Entityform type editing UI.
View source
class EntityformTypeUIController extends EntityDefaultUIController {
/**
* Overrides hook_menu() defaults.
*/
public function hook_menu() {
$items = parent::hook_menu();
$items[$this->path]['description'] = 'Manage entityform entity types, including adding and removing fields and the display of fields.';
$items[$this->path]['type'] = MENU_NORMAL_ITEM;
$items[$this->path . '/manage/%entity_object/edit']['context'] = MENU_CONTEXT_PAGE | MENU_CONTEXT_INLINE;
$rule_types = _entityform_get_rule_types();
foreach ($rule_types as $rule_type) {
// Add the menu items for the various Rules forms.
$controller = new RulesUIController();
$rule_path = $this->path . "/{$rule_type}_rules";
$items += $controller
->config_menu($rule_path);
$items[$rule_path] = array(
'title' => drupal_ucfirst($rule_type) . ' Rules',
'description' => '',
'page callback' => 'entityform_type_rules_list',
'page arguments' => array(
$rule_type,
),
'access arguments' => array(
'administer entityform types',
),
'file path' => drupal_get_path('module', 'entityform'),
'file' => 'entityform_type.admin.inc',
'type' => MENU_LOCAL_TASK,
);
$items["{$rule_path}/add"] = array(
'title' => "Add a {$rule_type} rule",
'description' => "Adds an additional {$rule_type} rule configuration.",
'page callback' => 'drupal_get_form',
'page arguments' => array(
"entityform_add_{$rule_type}_rule_form",
$rule_path,
),
'access arguments' => array(
'administer entityform types',
),
'file path' => drupal_get_path('module', 'rules_admin'),
'file' => 'rules_admin.inc',
'type' => MENU_LOCAL_ACTION,
);
}
return $items;
}
protected function overviewTableRow($conditions, $id, $entity, $additional_cols = array()) {
$row = parent::overviewTableRow($conditions, $id, $entity, $additional_cols);
$row[] = l(t('Submissions'), $this->path . '/manage/' . $id . '/submissions');
$row[] = l(t('Submit Link'), entity_ui_controller('entityform')
->submit_path($id));
return $row;
}
public function overviewTable($conditions = array()) {
$render = parent::overviewTable($conditions);
$render['#header'][] = t('Submissions');
$render['#header'][] = t('Submit Link');
return $render;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityDefaultUIController:: |
protected | property | ||
EntityDefaultUIController:: |
protected | property | ||
EntityDefaultUIController:: |
protected | property | ||
EntityDefaultUIController:: |
public | property | Defines the number of entries to show per page in overview table. | |
EntityDefaultUIController:: |
public | function | Applies an operation to the given entity. | |
EntityDefaultUIController:: |
public | function | Entity submit builder invoked via entity_ui_form_submit_build_entity(). | |
EntityDefaultUIController:: |
public | function | Provides definitions for implementing hook_forms(). | |
EntityDefaultUIController:: |
protected | function | Returns the operation count for calculating colspans. | |
EntityDefaultUIController:: |
public | function | Builds the operation form. | |
EntityDefaultUIController:: |
public | function | Operation form submit callback. | 1 |
EntityDefaultUIController:: |
public | function | Operation form validation callback. | |
EntityDefaultUIController:: |
public | function | Builds the entity overview form. | |
EntityDefaultUIController:: |
public | function | Overview form submit callback. | |
EntityDefaultUIController:: |
public | function | Overview form validation callback. | |
EntityDefaultUIController:: |
protected | function | Generates the table headers for the overview table. | |
EntityDefaultUIController:: |
public | function | ||
EntityformTypeUIController:: |
public | function |
Overrides hook_menu() defaults. Overrides EntityDefaultUIController:: |
|
EntityformTypeUIController:: |
public | function |
Generates the render array for a overview table for arbitrary entities
matching the given conditions. Overrides EntityDefaultUIController:: |
|
EntityformTypeUIController:: |
protected | function |
Generates the row for the passed entity and may be overridden in order to
customize the rows. Overrides EntityDefaultUIController:: |