You are here

class MandrillTemplateMapUIController in Mandrill 7

Same name and namespace in other branches
  1. 7.2 modules/mandrill_template/lib/mandrill_template_map.ui_controller.inc \MandrillTemplateMapUIController

Override EntityDefaultUIController to customize our menu items.

Hierarchy

Expanded class hierarchy of MandrillTemplateMapUIController

1 string reference to 'MandrillTemplateMapUIController'
mandrill_template_entity_info in modules/mandrill_template/mandrill_template.module
Implements hook_entity_info().

File

modules/mandrill_template/lib/mandrill_template_map.ui_controller.inc, line 10
The UI controller for the template map entity.

View source
class MandrillTemplateMapUIController extends EntityDefaultUIController {

  /**
   * Overrides EntityDefaultUIController::hook_menu().
   */
  public function hook_menu() {
    $items = parent::hook_menu();
    $items[$this->path]['description'] = 'Manage Mandrill Template Mapping entity settings.';
    $items[$this->path]['type'] = MENU_LOCAL_TASK;
    return $items;
  }

  /**
   * Overrides EntityDefaultUIController::overviewTableHeaders().
   */
  protected function overviewTableHeaders($conditions, $rows, $additional_header = array()) {
    $additional_header[] = t('Mandrill Template');
    $additional_header[] = t('Primary Content Zone');
    $additional_header[] = t('In Use By');
    $header = parent::overviewTableHeaders($conditions, $rows, $additional_header);
    return $header;
  }

  /**
   * Overrides EntityDefaultUIController::overviewTableRow().
   */
  protected function overviewTableRow($conditions, $id, $entity, $additional_cols = array()) {
    $additional_cols[] = $entity->template_id;
    $additional_cols[] = $entity->main_section;
    $additional_cols[] = $entity->mailsystem_key;
    return parent::overviewTableRow($conditions, $id, $entity, $additional_cols);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
EntityDefaultUIController::$entityInfo protected property
EntityDefaultUIController::$entityType protected property
EntityDefaultUIController::$id_count protected property
EntityDefaultUIController::$overviewPagerLimit public property Defines the number of entries to show per page in overview table.
EntityDefaultUIController::applyOperation public function Applies an operation to the given entity.
EntityDefaultUIController::entityFormSubmitBuildEntity public function Entity submit builder invoked via entity_ui_form_submit_build_entity().
EntityDefaultUIController::hook_forms public function Provides definitions for implementing hook_forms().
EntityDefaultUIController::operationCount protected function Returns the operation count for calculating colspans.
EntityDefaultUIController::operationForm public function Builds the operation form.
EntityDefaultUIController::operationFormSubmit public function Operation form submit callback. 1
EntityDefaultUIController::operationFormValidate public function Operation form validation callback.
EntityDefaultUIController::overviewForm public function Builds the entity overview form.
EntityDefaultUIController::overviewFormSubmit public function Overview form submit callback.
EntityDefaultUIController::overviewFormValidate public function Overview form validation callback.
EntityDefaultUIController::overviewTable public function Generates the render array for a overview table for arbitrary entities matching the given conditions.
EntityDefaultUIController::__construct public function
MandrillTemplateMapUIController::hook_menu public function Overrides EntityDefaultUIController::hook_menu(). Overrides EntityDefaultUIController::hook_menu
MandrillTemplateMapUIController::overviewTableHeaders protected function Overrides EntityDefaultUIController::overviewTableHeaders(). Overrides EntityDefaultUIController::overviewTableHeaders
MandrillTemplateMapUIController::overviewTableRow protected function Overrides EntityDefaultUIController::overviewTableRow(). Overrides EntityDefaultUIController::overviewTableRow