function image_gallery_handler_field_gallery_cover::get_cover_node_nid_query in Image 7
Same name and namespace in other branches
- 6 contrib/image_gallery/views/image_gallery_handler_field_gallery_cover.inc \image_gallery_handler_field_gallery_cover::get_cover_node_nid_query()
The query this handler should use to gets its cover node id, unless the field definition specifies one.
The return string should include a placeholder for the WHERE clause as in this basic case. This is where the tid(s) will go. The order clause should be supplied by the handler definition. Warning: this is NOT sophisticated stuff. The WHERE clause inserted into this string will expect to find a row "tn.tid" in the query.
1 call to image_gallery_handler_field_gallery_cover::get_cover_node_nid_query()
- image_gallery_handler_field_gallery_cover::get_cover_node_nid in contrib/
image_gallery/ views/ image_gallery_handler_field_gallery_cover.inc - Get the cover nid for the current tid.
File
- contrib/
image_gallery/ views/ image_gallery_handler_field_gallery_cover.inc, line 213
Class
- image_gallery_handler_field_gallery_cover
- Parent class for field handlers that gives us a gallery cover.
Code
function get_cover_node_nid_query() {
return 'SELECT n.nid from {node} n INNER JOIN {term_node} tn ON n.nid = tn.nid ' . "WHERE ***WHERE_CLAUSE*** AND n.type = 'image' AND n.status = 1 " . 'ORDER BY ***ORDER_CLAUSE***';
}