MonographDAO::deleteById PHP Method

deleteById() public method

public deleteById ( $submissionId )
    function deleteById($submissionId)
    {
        parent::deleteById($submissionId);
        $publishedMonographDao = DAORegistry::getDAO('PublishedMonographDAO');
        $publishedMonographDao->deleteById($submissionId);
        // Delete chapters and assigned chapter authors.
        $chapterDao = DAORegistry::getDAO('ChapterDAO');
        $chapters = $chapterDao->getChapters($submissionId);
        while ($chapter = $chapters->next()) {
            // also removes Chapter Author associations
            $chapterDao->deleteObject($chapter);
        }
        // Delete references to features or new releases.
        $featureDao = DAORegistry::getDAO('FeatureDAO');
        $featureDao->deleteByMonographId($submissionId);
        $newReleaseDao = DAORegistry::getDAO('NewReleaseDAO');
        $newReleaseDao->deleteByMonographId($submissionId);
        import('classes.search.MonographSearchIndex');
        MonographSearchIndex::deleteTextIndex($submissionId);
    }