You are here

function slickgrid_plugins_list in Slickgrid 6

Discover all action functions by invoking hook_action_info().


mymodule_action_info() {
return array(
'mymodule_functiondescription_action' => array(
'type' => 'node',
'description' => t('Save node'),
'configurable' => FALSE,
'hooks' => array(
'nodeapi' => array('delete', 'insert', 'update', 'view'),
'comment' => array('delete', 'insert', 'update', 'view'),
)
)
);
}

The description is used in presenting possible actions to the user for configuration. The type is used to present these actions in a logical grouping and to denote context. Some types are 'node', 'user', 'comment', and 'system'. If an action is configurable it will provide form, validation and submission functions. The hooks the action supports are declared in the 'hooks' array.

$actions['node_publish_action'] = array(
  'type' => 'node',
  'description' => t('Publish post'),
  'configurable' => FALSE,
  'hooks' => array(
    'nodeapi' => array(
      'presave',
      'insert',
      'update',
      'view',
    ),
    'comment' => array(
      'delete',
      'insert',
      'update',
      'view',
    ),
  ),
);

Parameters

$reset: Reset the action info static cache.

Return value

An associative array keyed on function name. The value of each key is an array containing information about the action, such as type of action and description of the action, e.g.,

1 call to slickgrid_plugins_list()
slickgrid_get_plugins in ./slickgrid.module
Enter description here ...

File

./slickgrid.module, line 723

Code

function slickgrid_plugins_list($reset = FALSE) {
  static $plugins;
  if (!isset($plugins) || $reset) {
    $editors = module_invoke_all('slickgrid_plugins');
    drupal_alter('slickgrid_plugins', $editors);
  }
  return (array) $editors;
}