function key_get_integration_settings in Key 7
Gets information about key integration settings.
Parameters
string $name: The name of an integration to retrieve.
bool $reset: A flag to force the settings to be retrieved from the database.
Return value
array An array of integration settings.
1 call to key_get_integration_settings()
- key_integration_features_export_render in includes/
key_integration.features.inc - Implements hook_features_export_render().
File
- ./
key.module, line 606 - Provides the ability to manage keys, which can be used by other modules.
Code
function key_get_integration_settings($name = NULL, $reset = FALSE) {
$rows =& drupal_static(__FUNCTION__);
if (!isset($rows) || $reset) {
$rows = db_query("SELECT * FROM {key_integration} ORDER BY name ASC")
->fetchAllAssoc('name', PDO::FETCH_ASSOC);
// Unserialize settings field.
foreach ($rows as $index => $row) {
if (!empty($row['settings'])) {
$settings = unserialize($row['settings']);
$rows[$index]['settings'] = $settings;
}
}
}
if ($name) {
return isset($rows[$name]) ? $rows[$name] : NULL;
}
else {
return $rows;
}
}