You are here

function hook_farm_ui_actions in farmOS 7

Provide action links on specific paths, asset types, and views.

Return value

array Returns an array of actions and their meta information (see example below).

Related topics

2 functions implement hook_farm_ui_actions()

Note: this list is generated by pattern matching, so it may include some functions that are not actually implementations of this hook.

farm_import_farm_ui_actions in modules/farm/farm_import/farm_import.module
Implements hook_farm_ui_actions().
farm_ui_farm_ui_actions in modules/farm/farm_ui/farm_ui.farm_ui.inc
Implements hook_farm_ui_actions().
1 invocation of hook_farm_ui_actions()
_farm_ui_menu_local_tasks_alter in modules/farm/farm_ui/farm_ui.action_links.inc
Helper function for adding farmOS action links.

File

modules/farm/farm_ui/farm_ui.api.php, line 233
Hooks provided by farm_ui.

Code

function hook_farm_ui_actions() {

  // Define farm area actions.
  $actions = array(
    'foo' => array(
      'title' => t('Add a foo log'),
      'href' => 'log/add/farm_foo',
      'paths' => array(
        'farm/asset/%/foo',
      ),
      'assets' => array(
        'bar',
      ),
      'views' => array(
        'foo_view',
      ),
    ),
  );
  return $actions;
}