Imbo\Database\Doctrine::deleteMetadata PHP Method

deleteMetadata() public method

public deleteMetadata ( $user, $imageIdentifier )
    public function deleteMetadata($user, $imageIdentifier)
    {
        if (!($id = $this->getImageId($user, $imageIdentifier))) {
            throw new DatabaseException('Image not found', 404);
        }
        $query = $this->getConnection()->createQueryBuilder();
        $query->delete($this->tableNames['metadata'])->where('imageId = :imageId')->setParameters([':imageId' => $id])->execute();
        return true;
    }