function flag_flag::enable in Flag 5
Same name and namespace in other branches
- 6.2 flag.inc \flag_flag::enable()
- 6 flag.inc \flag_flag::enable()
- 7.3 includes/flag/flag_flag.inc \flag_flag::enable()
- 7.2 flag.inc \flag_flag::enable()
Enable a flag provided by a module.
File
- ./
flag.inc, line 762 - 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 enable() {
if (isset($this->module)) {
$flag_status = variable_get('flag_default_flag_status', array());
$flag_status[$this->name] = TRUE;
variable_set('flag_default_flag_status', $flag_status);
}
}