You are here

class ContentTypeGroupUIController in Content type groups 7.2

UI controller for Content Type Group.

Hierarchy

Expanded class hierarchy of ContentTypeGroupUIController

1 string reference to 'ContentTypeGroupUIController'
content_type_groups_entity_info in ./content_type_groups.module
Implements hook_entity_info().

File

./content_type_groups.controller.inc, line 10
Contains controllers and entity hooks for the content_type_group entity.

View source
class ContentTypeGroupUIController extends EntityDefaultUIController {

  /**
   * Overrides hook_menu() defaults.
   */
  public function hook_menu() {
    $items = parent::hook_menu();
    $wildcard = '%content_type_group';

    // List of all CTGs
    $items[$this->path] = array(
      'title' => 'Content type groups',
      'description' => 'Manage content type groups',
      'page callback' => 'content_type_groups_admin',
      'file' => 'content_type_groups.admin.inc',
      'file path' => drupal_get_path('module', $this->entityInfo['module']),
      'access arguments' => array(
        'administer content types',
      ),
      // This permission is good enough for now. Does it really need a separate permission, honestly?
      'type' => MENU_LOCAL_ACTION,
    );

    // Add new CTG
    $items[$this->path . '/add'] = array(
      'title' => 'Add content type group',
      'description' => 'Add a new content type group',
      'page callback' => 'content_type_groups_admin_add_page',
      'file' => 'content_type_groups.admin.inc',
      'file path' => drupal_get_path('module', $this->entityInfo['module']),
      'type' => MENU_LOCAL_ACTION,
      'access arguments' => array(
        'administer content types',
      ),
    );

    // Edit existing CTG
    $items[$this->path . '/' . $wildcard . '/edit'] = array(
      'title' => 'Edit content type group',
      'description' => 'Edit an existing content type group',
      'load arguments' => array(
        TRUE,
      ),
      'page callback' => 'entity_ui_get_form',
      'page arguments' => array(
        'content_type_group',
        4,
      ),
      'file' => 'content_type_groups.admin.inc',
      'file path' => drupal_get_path('module', $this->entityInfo['module']),
      'access arguments' => array(
        'administer content types',
      ),
    );

    // Delete existing CTG
    $items[$this->path . '/' . $wildcard . '/delete'] = array(
      'title' => 'Delete content type group',
      'description' => 'Delete an existing content type group',
      'load arguments' => array(
        TRUE,
      ),
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'content_type_group_form_delete_confirm',
        4,
      ),
      'file' => 'content_type_groups.admin.inc',
      'file path' => drupal_get_path('module', $this->entityInfo['module']),
      'access arguments' => array(
        'administer content types',
      ),
    );
    return $items;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
ContentTypeGroupUIController::hook_menu public function Overrides hook_menu() defaults. Overrides EntityDefaultUIController::hook_menu
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::overviewTableHeaders protected function Generates the table headers for the overview table.
EntityDefaultUIController::overviewTableRow protected function Generates the row for the passed entity and may be overridden in order to customize the rows.
EntityDefaultUIController::__construct public function