function _scald_actions in Scald: Media Management made easy 6
Get the available Scald Actions
This function returns a structured array which specifies all the currently provided Scald Actions. The actions are in an array with one or more elements in the format: array( 'action-slug' => array( 'provider' => 'provider-name', 'title' => 'Plain-text title', 'mask' => 0x04, ), .. );
Return value
The Scald Actions array.
1 call to _scald_actions()
- scald_config_rebuild in ./
scald.module - Rebuild the Scald Configuration Object & other key configuration variables.
File
- ./
scald.module, line 674
Code
function _scald_actions() {
$scald_actions = array();
$scald_actions['@admin'] = array(
'provider' => 'scald',
'title' => t('Admin Mode'),
'mask' => SCALD_ACTIONS_ADMIN_BIT,
);
$scald_actions['fetch'] = array(
'provider' => 'scald',
'title' => t('Fetch'),
'mask' => SCALD_ACTIONS_FETCH,
);
$actions_results = db_query('
SELECT
action,
power,
provider,
title
FROM
{scald_actions}
');
while ($action_raw = db_fetch_array($actions_results)) {
$scald_actions[$action_raw['action']] = array(
'provider' => $action_raw['provider'],
'title' => $action_raw['title'],
'mask' => pow(2, $action_raw['power']),
);
}
return $scald_actions;
}