function clients_entity_info in Web Service Clients 7.3
Implements hook_entity_info().
File
- ./
clients.module, line 314 - Clients module provides a UI, storage, and an API for handling connections to remote webservices, including those provided by Services module on other Drupal sites.
Code
function clients_entity_info() {
$return = array(
'clients_connection' => array(
'label' => t('Clients Connection'),
'controller class' => 'ClientsConnectionHandlerEntityController',
'base table' => 'clients_connection',
'uri callback' => 'clients_connection_uri',
'fieldable' => FALSE,
'entity keys' => array(
'id' => 'cid',
'name' => 'name',
'label' => 'label',
),
// Entity API
'module' => 'clients',
'exportable' => TRUE,
'features controller class' => 'ClientsHandlerEntityFeaturesController',
'admin ui' => array(
'path' => 'admin/structure/clients/connections',
'file' => 'includes/clients.connection.admin.inc',
'controller class' => 'ClientsConnectionEntityUIController',
// Extras for our controller class.
// The user_access() permission for the whole of the UI.
'access permission' => 'administer clients connections',
// A callback whose keys will be the type names.
'types callback' => 'clients_get_connection_types',
),
// argh. we are in entity_ui_get_form. this does nada.
'form callback' => 'clients_connection_form',
'export' => array(
'default hook' => 'clients_default_connections',
),
// Entity API callbacks for the admin UI.
// Our handler controller's stuff.
'factory' => array(
'class prefix' => 'clients_connection_',
'broken class' => 'ClientsHandlerEntityBroken',
),
),
'clients_resource' => array(
'label' => t('Clients Resource'),
'controller class' => 'ClientsHandlerEntityController',
'base table' => 'clients_resource',
'uri callback' => 'clients_resource_uri',
'fieldable' => FALSE,
'entity keys' => array(
'id' => 'rid',
'name' => 'name',
'label' => 'label',
),
// Entity API
'module' => 'clients',
'exportable' => TRUE,
'features controller class' => 'ClientsHandlerEntityFeaturesController',
'admin ui' => array(
'path' => 'admin/structure/clients/resources',
'file' => 'includes/clients.resource.admin.inc',
'controller class' => 'ClientsResourceEntityUIController',
// Extras for our controller class.
'access permission' => 'administer clients resources',
// A callback whose keys will be the type names.
'types callback' => 'clients_get_resource_types',
),
// argh. we are in entity_ui_get_form. this does nada.
'form callback' => 'clients_resource_form',
'export' => array(
'default hook' => 'clients_default_resources',
),
// Entity API callbacks for the admin UI.
// Our handler controller's stuff.
'factory' => array(
'class prefix' => 'clients_resource_',
'broken class' => 'ClientsHandlerEntityBroken',
),
),
);
return $return;
}