public function deleteDocumentTypeBySlug($slug)
    {
        $documentTypes = $this->repository->documentTypes;
        foreach ($documentTypes as $key => $documentTypeObject) {
            if ($documentTypeObject->slug == $slug) {
                unset($documentTypes[$key]);
            }
        }
        $documentTypes = array_values($documentTypes);
        $this->repository->documentTypes = $documentTypes;
        $this->save();
    }