wsclient_ui.module in Web service client 7
Web service client UI - module file.
File
wsclient_ui/wsclient_ui.module
View source
<?php
define('WSCLIENT_UI_PATH', 'admin/config/services/wsclient');
function wsclient_ui_entity_info_alter(&$entity_info) {
$entity_info['wsclient_service']['admin ui'] = array(
'controller class' => 'WSClientUIController',
'path' => WSCLIENT_UI_PATH,
'file' => 'wsclient_ui.inc',
'file path' => drupal_get_path('module', 'wsclient_ui'),
);
$entity_info['wsclient_service']['uri callback'] = 'wsclient_ui_uri';
}
function wsclient_ui_operation_load($operation_name, $service_name) {
$service = wsclient_service_load($service_name);
if ($service && isset($service->operations[$operation_name])) {
$operation = $service->operations[$operation_name];
$operation['name'] = $operation_name;
return $operation;
}
return FALSE;
}
function wsclient_ui_type_load($type_name, $service_name) {
$service = wsclient_service_load($service_name);
if ($service && isset($service->datatypes[$type_name])) {
$type = $service->datatypes[$type_name];
$type['name'] = $type_name;
return $type;
}
return FALSE;
}
function wsclient_ui_uri($service) {
return array(
'path' => WSCLIENT_UI_PATH . '/manage/' . $service->name,
);
}
function wsclient_ui_theme() {
return array(
'wsclient_ui_parameter_form' => array(
'render element' => 'element',
'file' => 'wsclient_ui.inc',
),
'wsclient_ui_header_form' => array(
'render element' => 'element',
'file' => 'wsclient_ui.inc',
),
'wsclient_ui_property_form' => array(
'render element' => 'element',
'file' => 'wsclient_ui.inc',
),
'wsclient_ui_global_parameter_form' => array(
'render element' => 'element',
'file' => 'wsclient_ui.inc',
),
'wsclient_ui_global_header_parameter_form' => array(
'render element' => 'element',
'file' => 'wsclient_ui.inc',
),
);
}