class UnitsMeasureUIController in Units of Measurement 7.2
Same name and namespace in other branches
- 7 includes/UnitsMeasureUIController.class.inc \UnitsMeasureUIController
Admin UI controller class for entity type 'units_measure'.
Hierarchy
- class \EntityDefaultUIController
- class \UnitsAbstractUIController
- class \UnitsMeasureUIController
- class \UnitsAbstractUIController
Expanded class hierarchy of UnitsMeasureUIController
1 string reference to 'UnitsMeasureUIController'
- units_ui_entity_info_alter in ./
units_ui.module - Implements hook_entity_info_alter().
File
- includes/
UnitsMeasureUIController.class.inc, line 11 - Definition of UnitsMeasureUIController class.
View source
class UnitsMeasureUIController extends UnitsAbstractUIController {
protected function overviewTableHeaders($conditions, $rows, $additional_header = array()) {
// Adding extra column for managing units of this measure.
$additional_header[] = t('Units');
return parent::overviewTableHeaders($conditions, $rows, $additional_header);
}
protected function overviewTableRow($conditions, $id, $entity, $additional_cols = array()) {
// Adding extra cell for managing units of this measure.
$units_entity_info = entity_get_info('units_unit');
$additional_cols[] = l('manage units', str_replace('%units_measure_machine_name', $entity->measure, $units_entity_info['admin ui']['path']));
$row = parent::overviewTableRow($conditions, $id, $entity, $additional_cols);
// We have to strip out "Manage Display" link, as currently units cannot be
// viewed.
foreach ($row as $i => $cell) {
if (is_array($cell)) {
$cell = $cell['data'];
}
if (is_scalar($cell) && strpos($cell, $this->path . '/manage/' . $id . '/display') !== FALSE) {
$row[$i] = '';
break;
}
}
return $row;
}
}
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:: |
public | function | ||
UnitsAbstractUIController:: |
public | function |
Provides definitions for implementing hook_menu(). Overrides EntityDefaultUIController:: |
1 |
UnitsMeasureUIController:: |
protected | function |
Generates the table headers for the overview table. Overrides EntityDefaultUIController:: |
|
UnitsMeasureUIController:: |
protected | function |
Generates the row for the passed entity and may be overridden in order to
customize the rows. Overrides EntityDefaultUIController:: |