You are here

function flag_handler_field_ops::get_parent_relationship in Flag 6

Same name and namespace in other branches
  1. 6.2 includes/flag_handler_field_ops.inc \flag_handler_field_ops::get_parent_relationship()
  2. 7.3 includes/views/flag_handler_field_ops.inc \flag_handler_field_ops::get_parent_relationship()
  3. 7.2 includes/flag_handler_field_ops.inc \flag_handler_field_ops::get_parent_relationship()

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_handler_field_ops::get_parent_relationship()
flag_handler_field_ops::query in includes/flag_handler_field_ops.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/flag_handler_field_ops.inc, line 31
Contains the flag Ops field handler.

Class

flag_handler_field_ops
Views field handler for the Flag operations links (flag/unflag).

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;
  }
}