function flag_flag::get_valid_actions in Flag 6
Same name and namespace in other branches
- 5 flag.inc \flag_flag::get_valid_actions()
- 6.2 flag.inc \flag_flag::get_valid_actions()
- 7.3 includes/flag/flag_flag.inc \flag_flag::get_valid_actions()
- 7.2 flag.inc \flag_flag::get_valid_actions()
Returns an array of all actions that are executable with this flag.
File
- ./
flag.inc, line 598 - Implements various flags. Uses object oriented style inspired by that of Views 2.
Class
- flag_flag
- This abstract class represents a flag, or, in Views 2 terminology, "a handler".
Code
function get_valid_actions() {
$actions = module_invoke_all('action_info');
foreach ($actions as $callback => $action) {
if ($action['type'] != $this->content_type && !isset($action['hooks'][$this->content_type])) {
unset($actions[$callback]);
}
}
return $actions;
}