class EntityLegalDocumentVersionUIController in Entity Legal 7
Same name and namespace in other branches
- 7.2 entity_legal.entity_admin.inc \EntityLegalDocumentVersionUIController
Legal Document Version entity ui controller.
Hierarchy
Expanded class hierarchy of EntityLegalDocumentVersionUIController
1 string reference to 'EntityLegalDocumentVersionUIController'
- entity_legal_entity_info in ./
entity_legal.module - Implements hook_entity_info().
File
- ./
entity_legal.entity_admin.inc, line 100 - Admin ui controllers for entity_legal entities.
View source
class EntityLegalDocumentVersionUIController extends EntityDefaultUIController {
/**
* {@inheritdoc}
*/
public function hook_menu() {
$items = parent::hook_menu();
// Remove title callbacks that cause bundle notices.
foreach ($items as &$item) {
if (isset($item['title callback']) && $item['title callback'] == 'entity_ui_get_action_title') {
unset($item['title callback']);
$item['title'] = ucfirst($item['title arguments'][0]);
}
}
// Remove the overview path.
unset($items[$this->path]);
unset($items[$this->path . '/list']);
$wildcard = isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%entity_object';
$this->id_count = count(explode('/', $this->path));
$bundle_argument = 4;
// Add bundle to add form.
$items[$this->path . '/add']['title'] = 'Add new version';
$items[$this->path . '/add']['page callback'] = 'entity_legal_document_version_ui_get_form';
$items[$this->path . '/add']['page arguments'] = array(
NULL,
$bundle_argument,
'add',
);
// Add bundle to edit form.
$items[$this->path . '/manage/' . $wildcard]['page callback'] = 'entity_legal_document_version_ui_get_form';
$items[$this->path . '/manage/' . $wildcard]['page arguments'] = array(
$this->id_count + 1,
$bundle_argument,
'edit',
);
// Add bundle to edit form.
$items[$this->path . '/manage/' . $wildcard . '/edit']['page callback'] = 'entity_legal_document_version_ui_get_form';
$items[$this->path . '/manage/' . $wildcard . '/edit']['page arguments'] = array(
$this->id_count + 1,
$bundle_argument,
'edit',
);
return $items;
}
/**
* {@inheritdoc}
*/
public function hook_forms() {
$forms = parent::hook_forms();
// Rewrite form ids to include the module name as a prefix.
if (!(count($this->entityInfo['bundles']) == 1 && isset($this->entityInfo['bundles'][$this->entityType]))) {
foreach ($this->entityInfo['bundles'] as $bundle => $bundle_info) {
$forms[$this->entityType . '_edit_' . $bundle . '_form']['callback'] = 'entity_legal_document_version_form';
}
}
return $forms;
}
}
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:: |
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:: |
public | function | Generates the render array for a overview table for arbitrary entities matching the given conditions. | |
EntityDefaultUIController:: |
protected | function | Generates the table headers for the overview table. | |
EntityDefaultUIController:: |
protected | function | Generates the row for the passed entity and may be overridden in order to customize the rows. | |
EntityDefaultUIController:: |
public | function | ||
EntityLegalDocumentVersionUIController:: |
public | function |
Provides definitions for implementing hook_forms(). Overrides EntityDefaultUIController:: |
|
EntityLegalDocumentVersionUIController:: |
public | function |
Provides definitions for implementing hook_menu(). Overrides EntityDefaultUIController:: |