function flag_clear_handler_field_unflag::get_flag in Flag clear 7
Returns the flag object associated with our field.
A field is in some relationship. This function reaches out for this relationship and reads its 'flag' option, which holds the flag name.
3 calls to flag_clear_handler_field_unflag::get_flag()
- flag_clear_handler_field_unflag::pre_render in includes/
views/ flag_clear_handler_field_unflag.inc - Find out if the flag applies to each item seen on the page. It's done in a separate DB query to to avoid complexity and to make 'many to one' tests (e.g. checking user roles) possible without causing duplicate rows.
- flag_clear_handler_field_unflag::query in includes/
views/ flag_clear_handler_field_unflag.inc - Override base ::query(). The purpose here is to make it possible for the render() method to know two things: what's the content ID, and whether it's flagged.
- flag_clear_handler_field_unflag::render in includes/
views/ flag_clear_handler_field_unflag.inc - Render the field.
File
- includes/
views/ flag_clear_handler_field_unflag.inc, line 21 - Contains the flag clearing field handler.
Class
- flag_clear_handler_field_unflag
- Views field handler for the Flag clearing links.
Code
function get_flag() {
// When editing a view it's possible to delete the relationship (either by
// error or to later recreate it), so we have to guard against a missing
// one.
if (isset($this->view->relationship[$this->options['relationship']])) {
return $this->view->relationship[$this->options['relationship']]
->get_flag();
}
}