function _gateways_build in SMS Framework 7
Same name and namespace in other branches
- 5 sms.module \_gateways_build()
- 6.2 sms.module \_gateways_build()
- 6 sms.module \_gateways_build()
Helper function to get gateway definitions in hook_gateway_info.
Return value
array A array of gateway definitions from hook_gateway_info().
1 call to _gateways_build()
- sms_gateways in ./
sms.module - Gets a list of all gateways.
File
- ./
sms.module, line 416 - The core of the SMS Framework. Provides gateway management and API for sending and receiving SMS messages.
Code
function _gateways_build() {
$_gateways = array();
$_names = array();
$gateway_array = module_invoke_all('gateway_info');
foreach ($gateway_array as $identifier => $info) {
$info['configuration'] = variable_get('sms_' . $identifier . '_settings', array());
// Allow other modules to alter this gateway info.
drupal_alter('gateway_info', $info, $identifier);
$_gateways[$identifier] = $info;
$_names[$identifier] = $info['name'];
}
asort($_names);
return array(
$_gateways,
$_names,
);
}