function photo_has_gallery($entity, $entity_id) { return sfPhotoGalleryPeer::hasGallery($entity, $entity_id); }