function clients_connection_base::get_credentials_storage_plugin in Web Service Clients 7.3
Get the credentials storage plugin for this connection.
Parameters
$plugin_id: (Optional) The id of the plugin to retrieve. Specifying this allows the loading of the old plugin during connection form save.
Return value
The instantiated plugin handler.
1 call to clients_connection_base::get_credentials_storage_plugin()
- clients_connection_base::credentialsLoad in includes/
clients.entity.inc - Load the credentials into the connection.
File
- includes/
clients.entity.inc, line 91 - Provides base classes for clients handler entities.
Class
- clients_connection_base
- Base class for client connections.
Code
function get_credentials_storage_plugin($plugin_id = NULL) {
if (!isset($plugin_id)) {
if (isset($this->configuration['credentials_storage'])) {
$plugin_id = $this->configuration['credentials_storage'];
}
else {
// Fallback to the connection configuration plugin by default. This also
// ensures backward compatibility.
$plugin_id = 'connection_configuration';
}
}
// Get the credentials storage plugin.
ctools_include('plugins');
$storage_plugin = ctools_get_plugins('clients', 'clients_credentials_storage', $plugin_id);
$class = ctools_plugin_get_class($storage_plugin, 'handler');
return new $class();
}