function flag_flag::find_default_flag in Flag 7.3
Same name and namespace in other branches
- 6.2 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 includes/
flag/ flag_flag.inc - Reverts an overriding flag to its default state.
File
- includes/
flag/ flag_flag.inc, line 1462 - Contains the flag_flag class. Flag type classes use an 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];
}
}
}