Ansel_Api::galleryExists PHP Method

galleryExists() public method

Checks if the gallery exists
public galleryExists ( integer $gallery_id, string $slug = '', string $app = null ) : boolean
$gallery_id integer The gallery id
$slug string The gallery slug
$app string Application scope to use, if not the default.
return boolean
    public function galleryExists($gallery_id, $slug = '', $app = null)
    {
        if (!is_null($app)) {
            $GLOBALS['injector']->getInstance('Ansel_Config')->set('scope', $app);
        }
        return $GLOBALS['injector']->getInstance('Ansel_Storage')->galleryExists($gallery_id, $slug);
    }