class EntityBundleableUIController in Entity API 7
UI controller providing UI for bundleable content entities.
Adds a bundle selection page to the entity/add path, analogously to the node/add path.
Hierarchy
- class \EntityDefaultUIController
- class \EntityContentUIController
- class \EntityBundleableUIController
- class \EntityContentUIController
Expanded class hierarchy of EntityBundleableUIController
File
- includes/
entity.ui.inc, line 585 - Provides a controller for building an entity overview form.
View source
class EntityBundleableUIController extends EntityContentUIController {
/**
* Provides definitions for implementing hook_menu().
*/
public function hook_menu() {
$items = parent::hook_menu();
// Extend the 'add' path.
$items[$this->path . '/add'] = array(
'title callback' => 'entity_ui_get_action_title',
'title arguments' => array(
'add',
$this->entityType,
),
'page callback' => 'entity_ui_bundle_add_page',
'page arguments' => array(
$this->entityType,
),
'access callback' => 'entity_access',
'access arguments' => array(
'create',
$this->entityType,
),
'type' => MENU_LOCAL_ACTION,
);
$items[$this->path . '/add/%'] = array(
'title callback' => 'entity_ui_get_action_title',
'title arguments' => array(
'add',
$this->entityType,
$this->id_count + 1,
),
'page callback' => 'entity_ui_get_bundle_add_form',
'page arguments' => array(
$this->entityType,
$this->id_count + 1,
),
'access callback' => 'entity_access',
'access arguments' => array(
'create',
$this->entityType,
),
);
if (!empty($this->entityInfo['admin ui']['file'])) {
// Add in the include file for the entity form.
foreach (array(
'/add',
'/add/%',
) as $path_end) {
$items[$this->path . $path_end]['file'] = $this->entityInfo['admin ui']['file'];
$items[$this->path . $path_end]['file path'] = isset($this->entityInfo['admin ui']['file path']) ? $this->entityInfo['admin ui']['file path'] : drupal_get_path('module', $this->entityInfo['module']);
}
}
return $items;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
EntityBundleableUIController:: |
public | function |
Provides definitions for implementing hook_menu(). Overrides EntityContentUIController:: |
|
EntityContentUIController:: |
public | function |
Operation form submit callback. Overrides EntityDefaultUIController:: |
|
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 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 |