class WsConfigUIController in Web Service Data 7
UI controller
Hierarchy
- class \EntityDefaultUIController
- class \WsConfigUIController
Expanded class hierarchy of WsConfigUIController
1 string reference to 'WsConfigUIController'
- wsconfig_entity_info in modules/
wsconfig/ wsconfig.module - Implements hook_entity_info().
File
- modules/
wsconfig/ wsconfig.entity.inc, line 307 - Entity classes
View source
class WsConfigUIController extends EntityDefaultUIController {
/**
* Overrides hook_menu() defaults. Main reason for doing this is that
* parent class hook_menu() is optimized for entity type administration.
*/
public function hook_menu() {
$items = parent::hook_menu();
$id_count = count(explode('/', $this->path));
$wildcard = isset($this->entityInfo['admin ui']['menu wildcard']) ? $this->entityInfo['admin ui']['menu wildcard'] : '%' . $this->entityType;
// Change the overview menu type for the list of web service configurations.
$items[$this->path]['type'] = MENU_NORMAL_ITEM;
// Change the add page menu to multiple types of entities
$items[$this->path . '/add'] = array(
'title' => t('Add a wsconfig'),
'description' => t('Add a new Web Service Configuration'),
'page callback' => 'wsconfig_add_page',
'access callback' => 'wsconfig_access',
'access arguments' => array(
'edit',
),
'type' => MENU_LOCAL_ACTION,
'weight' => -20,
'file' => 'wsconfig.admin.inc',
'file path' => drupal_get_path('module', $this->entityInfo['module']),
);
// Add menu items to add each different type of entity.
foreach (wsconfig_get_types() as $type) {
$items[$this->path . '/add/' . $type->type] = array(
'title' => 'Add ' . $type->label,
'page callback' => 'wsconfig_form_wrapper',
'page arguments' => array(
wsconfig_create(array(
'type' => $type->type,
)),
),
'access callback' => 'wsconfig_access',
'access arguments' => array(
'edit',
'edit ' . $type->type,
),
'file' => 'wsconfig.admin.inc',
'file path' => drupal_get_path('module', $this->entityInfo['module']),
);
}
// Loading and editing wsconfig entities
// Menu item for viewing web service configurations
$items[$this->path . '/' . $wildcard] = array(
'title callback' => 'wsconfig_page_title',
'title arguments' => array(
$id_count,
),
'page callback' => 'wsconfig_view_form_wrapper',
'page arguments' => array(
$id_count,
),
'access callback' => 'wsconfig_access',
'access arguments' => array(
'view',
$id_count,
),
'type' => MENU_CALLBACK,
'file' => 'wsconfig.admin.inc',
'file path' => drupal_get_path('module', $this->entityInfo['module']),
);
return $items;
}
/**
* Create the markup for the add Web Service Configuration Entities page within the class
* so it can easily be extended/overriden.
*/
public function addPage() {
return theme('wsconfig_add_list', array(
'content' => wsconfig_get_types(),
));
}
}
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:: |
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 | ||
WsConfigUIController:: |
public | function | Create the markup for the add Web Service Configuration Entities page within the class so it can easily be extended/overriden. | |
WsConfigUIController:: |
public | function |
Overrides hook_menu() defaults. Main reason for doing this is that
parent class hook_menu() is optimized for entity type administration. Overrides EntityDefaultUIController:: |