function clients_handler_get_add_form in Web Service Clients 7.3
Page callback to add a handler entity of a specific bundle.
Parameters
$entity_type: The type of the entity.
$handler_type: The handler type machine name.
1 string reference to 'clients_handler_get_add_form'
- ClientsHandlerEntityUIController::hook_menu in includes/
clients.ui.inc - Provides definitions for implementing hook_menu().
File
- ./
clients.module, line 594 - 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_handler_get_add_form($entity_type, $handler_type) {
// Make a stub entity of the right bundle to pass to entity_ui_get_form().
$values = array(
'type' => $handler_type,
);
$entity = entity_create($entity_type, $values);
return entity_ui_get_form($entity_type, $entity, 'add');
}