function image_handler_relationship_node_image_file::ensure_my_table in Image 7
Same name and namespace in other branches
- 6 views/image_handler_relationship_node_image_file.inc \image_handler_relationship_node_image_file::ensure_my_table()
Ensure the main table for this handler is in the query. This is used a lot.
Overrides views_handler::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;
}