You are here

function flag_clear_handler_field_unflag::get_parent_relationship in Flag clear 7

Return the the relationship we're linked to. That is, the alias for its table (which is suitbale for use with the various methods of the 'query' object).

1 call to flag_clear_handler_field_unflag::get_parent_relationship()
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.

File

includes/views/flag_clear_handler_field_unflag.inc, line 35
Contains the flag clearing field handler.

Class

flag_clear_handler_field_unflag
Views field handler for the Flag clearing links.

Code

function get_parent_relationship() {
  $parent = $this->view->relationship[$this->options['relationship']]->options['relationship'];
  if (!$parent || $parent == 'none') {
    return NULL;

    // Base query table.
  }
  else {
    return $this->view->relationship[$parent]->alias;
  }
}