You are here

function node_gallery_api_is_gallery in Node Gallery 7

Is this NID a for a gallery node.

Parameters

int $nid: NID to check.

Return value

bool Whether this is a gallery.

2 calls to node_gallery_api_is_gallery()
node_gallery_api_entity_delete in ./node_gallery_api.module
Implements hook_entity_delete().
node_gallery_api_entity_insert in ./node_gallery_api.module
Implements hook_entity_insert().

File

./node_gallery_api.inc, line 129
Node Gallery API function

Code

function node_gallery_api_is_gallery($nid) {
  return (bool) db_select('node_gallery_galleries', 'ngg')
    ->fields('ngg', array(
    'ngid',
  ))
    ->condition('ngid', $nid)
    ->execute()
    ->fetchField();
}