class CivicrmEntityUIController in CiviCRM Entity 7
Same name and namespace in other branches
- 7.2 civicrm_entity_ui_controller.inc \CivicrmEntityUIController
Hierarchy
- class \EntityDefaultUIController
- class \EntityContentUIController
- class \CivicrmEntityUIController
- class \EntityContentUIController
Expanded class hierarchy of CivicrmEntityUIController
1 string reference to 'CivicrmEntityUIController'
- civicrm_entity_entity_info in ./
civicrm_entity.module - Here we declare selected CiviCRM entities to Drupal.
File
- ./
civicrm_entity_ui_controller.inc, line 3
View source
class CivicrmEntityUIController extends EntityContentUIController {
public $overviewPagerLimit = 25;
/**
* Always use the same civicrm_entity_form
* @return mixed
*/
public function hook_forms() {
$forms = parent::hook_forms();
foreach ($this->entityInfo['bundles'] as $bundle => $bundle_info) {
if (isset($bundle_info['admin'])) {
$form_id = !isset($bundle) || $bundle == $this->entityType ? $this->entityType . '_form' : $this->entityType . '_edit_' . $bundle . '_form';
$forms[$form_id] = array(
'callback' => 'civicrm_entity_form',
);
}
}
return $forms;
}
public function overviewTable($conditions = array()) {
/*
$query = new EntityFieldQuery();
$query->entityCondition('entity_type', $this->entityType);
// Add all conditions to query.
foreach ($conditions as $key => $value) {
$query->propertyCondition($key, $value);
}
if ($this->overviewPagerLimit) {
$query->pager($this->overviewPagerLimit);
}
$results = $query->execute();
$ids = isset($results[$this->entityType]) ? array_keys($results[$this->entityType]) : array();
$entities = $ids ? entity_load($this->entityType, $ids) : array();
ksort($entities);
$rows = array();
foreach ($entities as $entity) {
$rows[] = $this->overviewTableRow($conditions, entity_id($this->entityType, $entity), $entity);
}
$render = array(
'#theme' => 'table',
'#header' => $this->overviewTableHeaders($conditions, $rows),
'#rows' => $rows,
'#empty' => t('None.'),
);
return $render;
*/
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
CivicrmEntityUIController:: |
public | property |
Defines the number of entries to show per page in overview table. Overrides EntityDefaultUIController:: |
|
CivicrmEntityUIController:: |
public | function |
Always use the same civicrm_entity_form Overrides EntityDefaultUIController:: |
|
CivicrmEntityUIController:: |
public | function |
Generates the render array for a overview table for arbitrary entities
matching the given conditions. Overrides EntityDefaultUIController:: |
|
EntityContentUIController:: |
public | function |
Provides definitions for implementing hook_menu(). Overrides EntityDefaultUIController:: |
1 |
EntityContentUIController:: |
public | function |
Operation form submit callback. Overrides EntityDefaultUIController:: |
|
EntityDefaultUIController:: |
protected | property | ||
EntityDefaultUIController:: |
protected | property | ||
EntityDefaultUIController:: |
protected | property | ||
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 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:: |
protected | function | Generates the row for the passed entity and may be overridden in order to customize the rows. | |
EntityDefaultUIController:: |
public | function |