function flag_flag::find_default_flag in Flag 6.2
Same name and namespace in other branches
- 7.3 includes/flag/flag_flag.inc \flag_flag::find_default_flag()
- 7.2 flag.inc \flag_flag::find_default_flag()
Finds the "default flag" corresponding to this flag.
Flags defined in code ("default flags") can be overridden. This method returns the default flag that is being overridden by $this. Returns NULL if $this overrides no default flag.
1 call to flag_flag::find_default_flag()
- flag_flag::revert in ./
flag.inc - Reverts an overriding flag to its default state.
File
- ./
flag.inc, line 1134 - 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 find_default_flag() {
if ($this->fid) {
$default_flags = flag_get_default_flags(TRUE);
if (isset($default_flags[$this->name])) {
return $default_flags[$this->name];
}
}
}