You are here

class WsConfigUIController in Web Service Data 7

UI controller

Hierarchy

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

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::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
WsConfigUIController::addPage public function Create the markup for the add Web Service Configuration Entities page within the class so it can easily be extended/overriden.
WsConfigUIController::hook_menu 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::hook_menu