Add form to delete placeholders

This commit is contained in:
Mike Colagrosso 2024-12-19 00:01:54 -07:00 committed by Alex Cabal
parent 18bcde3bf6
commit d0d79d637c
6 changed files with 79 additions and 1 deletions

View file

@ -2156,6 +2156,27 @@ final class Ebook{
}
}
public function Delete(): void{
$this->RemoveTags();
$this->RemoveLocSubjects();
$this->RemoveCollectionMemberships();
$this->RemoveGitCommits();
$this->RemoveSources();
$this->RemoveContributors();
$this->RemoveTocEntries();
$this->RemoveEbookPlaceholder();
foreach($this->Projects as $project){
$project->Delete();
}
Db::Query('
DELETE
from Ebooks
where EbookId = ?
', [$this->EbookId]);
}
// ***********
// ORM METHODS
// ***********