mirror of
https://github.com/standardebooks/web.git
synced 2025-07-18 04:16:38 -04:00
Add form to delete placeholders
This commit is contained in:
parent
18bcde3bf6
commit
d0d79d637c
6 changed files with 79 additions and 1 deletions
|
@ -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
|
||||
// ***********
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue