You are here

function hook_farm_area_link_alter in farmOS 7

Alter area link in area details created by Farm UI.

Parameters

$link: An array with keys for the link 'href' and 'title', which will be used directly in the l() function.

$entity_info: Information about the entity type that the link is being built for. This will contain keys:

  • entity_type: The entity type.
  • bundle: The entity bundle.
  • entity_ids: An array of entity IDs that are extracted from the entity View results (which may be paged, in which case you only get the first page).

Related topics

1 function implements hook_farm_area_link_alter()

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

farm_group_farm_area_link_alter in modules/farm/farm_group/farm_group.farm_area.inc
Implements hook_farm_area_link_alter().
1 invocation of hook_farm_area_link_alter()
farm_ui_area_links in modules/farm/farm_ui/farm_ui.farm_area.inc
Generate area links for farm_asset or log entity types.

File

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

Code

function hook_farm_area_link_alter(&$link, $entity_info) {
  $link = array(
    'title' => 'New title',
    'href' => 'new-path',
  );
}