You are here

function hook_clients_connection_type_info in Web Service Clients 7.3

Same name and namespace in other branches
  1. 6.2 clients.api.php \hook_clients_connection_type_info()
  2. 7 clients.api.php \hook_clients_connection_type_info()
  3. 7.2 clients.api.php \hook_clients_connection_type_info()

Inform Clients about connection types.

Return value

array An array of information on the connection types implemented by a module, keyed by the machine-readable name for the type. The class for the connection type is automatically of the form 'clients_connection_TYPE'. Each type is itself an array, with following keys: 'label': the human-readable label. 'description': (optional) A more detailed description of the type. 'class': (optional) Use if you don't want to use another class than the automatically used one. 'tests': (optional) An array of test classes that this connection type can use for the testing UI. The keys should be the test IDs, and the values the name of the test class, which should implement ClientsConnectionTestingInterface.

3 functions implement hook_clients_connection_type_info()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

clients_drupal_clients_connection_type_info in connections/clients_drupal/clients_drupal.module
Implements hook_clients_connection_type_info().
clients_drupal_rest_clients_connection_type_info in connections/clients_drupal_rest/clients_drupal_rest.module
Implements hook_clients_connection_type_info().
clients_test_clients_connection_type_info in tests/clients_test/clients_test.module
Implements hook_clients_connection_type_info().
2 invocations of hook_clients_connection_type_info()
clients_connection_uninstall_connection_delete in ./clients.install
Helper function for connection type modules to delete all their connections.
clients_get_connection_types in ./clients.module
Get a list of all connection types.

File

./clients.api.php, line 57
Hooks provided by the Clients module.

Code

function hook_clients_connection_type_info() {
  return array(
    'my_client' => array(
      'label' => t('My Client Type'),
      'description' => t('Connects to a remote service.'),
      'tests' => array(
        'connect' => 'MyClientTypeTestConnection',
      ),
    ),
  );
}