You are here

class WSClientUIController in Web service client 7

Controller class for customizing the default Entity UI.

Hierarchy

Expanded class hierarchy of WSClientUIController

1 string reference to 'WSClientUIController'
wsclient_ui_entity_info_alter in wsclient_ui/wsclient_ui.module
Implements hook_entity_info_alter().

File

wsclient_ui/wsclient_ui.inc, line 12
WSClient UI - implements service description management and configuration screens.

View source
class WSClientUIController extends EntityDefaultUIController {

  /**
   * Customizes menu items.
   *
   * @see EntityDefaultUIController::hook_menu()
   */
  function hook_menu() {
    $items = parent::hook_menu();

    // Add additionally need menu items to manage web service operations.
    $id_count = count(explode('/', $this->path)) + 1;
    $items[$this->path . '/manage/%wsclient_service/add/operation'] = array(
      'title' => 'Add operation',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'wsclient_ui_operation',
        $id_count,
        NULL,
        'add',
      ),
      'access arguments' => array(
        'administer web services',
      ),
      'file' => 'wsclient_ui.inc',
      'file path' => drupal_get_path('module', 'wsclient_ui'),
    );
    $op_count = $id_count + 2;
    $items[$this->path . '/manage/%wsclient_service/operation/%wsclient_ui_operation'] = array(
      'title' => 'Edit operation',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'wsclient_ui_operation',
        $id_count,
        $op_count,
        'edit',
      ),
      'load arguments' => array(
        $id_count,
      ),
      'access arguments' => array(
        'administer web services',
      ),
      'file' => 'wsclient_ui.inc',
      'file path' => drupal_get_path('module', 'wsclient_ui'),
    );
    $items[$this->path . '/manage/%wsclient_service/operation/%wsclient_ui_operation/delete'] = array(
      'title' => 'Delete operation',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'wsclient_ui_operation_delete',
        $id_count,
        $op_count,
      ),
      'load arguments' => array(
        $id_count,
      ),
      'access arguments' => array(
        'administer web services',
      ),
      'file' => 'wsclient_ui.inc',
      'file path' => drupal_get_path('module', 'wsclient_ui'),
    );

    // Menu items to manage data types.
    $items[$this->path . '/manage/%wsclient_service/add/type'] = array(
      'title' => 'Add data type',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'wsclient_ui_type',
        $id_count,
        NULL,
        'add',
      ),
      'access arguments' => array(
        'administer web services',
      ),
      'file' => 'wsclient_ui.inc',
      'file path' => drupal_get_path('module', 'wsclient_ui'),
    );
    $items[$this->path . '/manage/%wsclient_service/type/%wsclient_ui_type'] = array(
      'title' => 'Edit data type',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'wsclient_ui_type',
        $id_count,
        $op_count,
        'edit',
      ),
      'load arguments' => array(
        $id_count,
      ),
      'access arguments' => array(
        'administer web services',
      ),
      'file' => 'wsclient_ui.inc',
      'file path' => drupal_get_path('module', 'wsclient_ui'),
    );
    $items[$this->path . '/manage/%wsclient_service/type/%wsclient_ui_type/delete'] = array(
      'title' => 'Delete data type',
      'page callback' => 'drupal_get_form',
      'page arguments' => array(
        'wsclient_ui_type_delete',
        $id_count,
        $op_count,
      ),
      'load arguments' => array(
        $id_count,
      ),
      'access arguments' => array(
        'administer web services',
      ),
      'file' => 'wsclient_ui.inc',
      'file path' => drupal_get_path('module', 'wsclient_ui'),
    );

    // Overrides the default description of the top level menu item.
    $items[$this->path]['description'] = 'Manage Web Service Descriptions for Web service client.';
    return $items;
  }

}

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
WSClientUIController::hook_menu function Customizes menu items. Overrides EntityDefaultUIController::hook_menu