You are here

function hook_flag_link in Flag 7.3

Same name and namespace in other branches
  1. 6.2 flag.api.php \hook_flag_link()
  2. 7.2 flag.api.php \hook_flag_link()

Return the link for the link types this module defines.

The type of link to be produced is given by $flag->link_type.

When Flag uses a link type provided by this module, it will call this implementation of hook_flag_link(). This should return a single link's attributes, using the same structure as hook_link(). Note that "title" is provided by the Flag configuration if not specified here.

Parameters

flag_flag $flag: The full flag object for the flag link being generated.

string $action: The action this link should perform. Either 'flag' or 'unflag'.

int $entity_id: The ID of the node, comment, user, or other object being flagged. The type of the object can be deduced from the flag type.

Return value

An array defining properties of the link.

See also

hook_flag_link_type_info()

template_preprocess_flag()

1 function implements hook_flag_link()

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

flag_flag_link in ./flag.module
Implements hook_flag_link().
1 invocation of hook_flag_link()
template_preprocess_flag in ./flag.module
A preprocess function for our theme('flag'). It generates the variables needed there.

File

./flag.api.php, line 330
Hooks provided by the Flag module.

Code

function hook_flag_link($flag, $action, $entity_id) {
}