public function imageExists($user, $imageIdentifier) { $cursor = $this->getGrid()->find(['user' => $user, 'imageIdentifier' => $imageIdentifier]); return (bool) $cursor->count(); }