You are here

function image_handler_relationship_node_image_file::ensure_my_table in Image 6

Same name and namespace in other branches
  1. 7 views/image_handler_relationship_node_image_file.inc \image_handler_relationship_node_image_file::ensure_my_table()

File

views/image_handler_relationship_node_image_file.inc, line 34
Views relationship handler for image size filter.

Class

image_handler_relationship_node_image_file
@file Views relationship handler for image size filter.

Code

function ensure_my_table() {
  if (!isset($this->table_alias)) {
    $join = $this
      ->get_join();

    // Adjust the join for the selected image size.
    if (!empty($this->options['image_size'])) {
      $join->extra[] = array(
        'field' => 'image_size',
        'value' => $this->options['image_size'],
      );
    }
    $this->table_alias = $this->query
      ->add_table($this->table, $this->relationship, $join);
  }
  return $this->table_alias;
}