function flag_flag::delete in Flag 7.3
Same name and namespace in other branches
- 5 flag.inc \flag_flag::delete()
- 6.2 flag.inc \flag_flag::delete()
- 6 flag.inc \flag_flag::delete()
- 7.2 flag.inc \flag_flag::delete()
Deletes a flag from the database.
File
- includes/
flag/ flag_flag.inc, line 1422 - 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 delete() {
field_attach_delete_bundle('flagging', $this->name);
db_delete('flag')
->condition('fid', $this->fid)
->execute();
db_delete('flagging')
->condition('fid', $this->fid)
->execute();
db_delete('flag_types')
->condition('fid', $this->fid)
->execute();
db_delete('flag_counts')
->condition('fid', $this->fid)
->execute();
module_invoke_all('flag_delete', $this);
}