You are here

function _actions_permissions_get_custom_actions in Views Bulk Operations (VBO) 6.3

Same name and namespace in other branches
  1. 6 actions_permissions.module \_actions_permissions_get_custom_actions()
1 call to _actions_permissions_get_custom_actions()
actions_permissions_perm in ./actions_permissions.module
Implementation of hook_perm().

File

./actions_permissions.module, line 22

Code

function _actions_permissions_get_custom_actions() {
  $actions = array();
  $static_actions = actions_list();
  $result = db_query("SELECT * FROM {actions} WHERE parameters > ''");
  while ($action = db_fetch_object($result)) {
    $actions[$action->aid] = array(
      'description' => $action->description,
      'type' => $action->type,
      'configurable' => FALSE,
      'parameters' => unserialize($action->parameters),
    );
    $actions[$action->aid]['behavior'] = isset($static_actions[$action->callback]['behavior']) ? $static_actions[$action->callback]['behavior'] : null;
  }
  return $actions;
}