You are here

function flag_handler_relationship_content::query in Flag 6

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

Called to implement a relationship in a query.

File

includes/flag_handler_relationships.inc, line 70
Contains various relationship handlers.

Class

flag_handler_relationship_content
Specialized relationship handler associating flags and content.

Code

function query() {
  $flag = flag_get_flag($this->options['flag']);
  $this->definition['extra'][] = array(
    'field' => 'fid',
    'value' => $flag->fid,
    'numeric' => TRUE,
  );
  if ($this->options['user_scope'] == 'current' && !$flag->global) {
    $this->definition['extra'][] = array(
      'field' => 'uid',
      'value' => '***CURRENT_USER***',
      'numeric' => TRUE,
    );
  }
  parent::query();
}