/** * Delete a press by ID, INCLUDING ALL DEPENDENT ITEMS. * @param $pressId int */ function deleteById($pressId) { $pressSettingsDao = DAORegistry::getDAO('PressSettingsDAO'); $pressSettingsDao->deleteById($pressId); $seriesDao = DAORegistry::getDAO('SeriesDAO'); $seriesDao->deleteByPressId($pressId); $emailTemplateDao = DAORegistry::getDAO('EmailTemplateDAO'); $emailTemplateDao->deleteEmailTemplatesByContext($pressId); $notificationStatusDao = DAORegistry::getDAO('NotificationStatusDAO'); $notificationStatusDao->deleteByPressId($pressId); $monographDao = DAORegistry::getDAO('MonographDAO'); $monographDao->deleteByContextId($pressId); $pluginSettingsDao = DAORegistry::getDAO('PluginSettingsDAO'); $pluginSettingsDao->deleteByContextId($pressId); $reviewFormDao = DAORegistry::getDAO('ReviewFormDAO'); $reviewFormDao->deleteByAssoc(ASSOC_TYPE_PRESS, $pressId); $featureDao = DAORegistry::getDAO('FeatureDAO'); $featureDao->deleteByAssoc(ASSOC_TYPE_PRESS, $pressId); $newReleaseDao = DAORegistry::getDAO('NewReleaseDAO'); $newReleaseDao->deleteByAssoc(ASSOC_TYPE_PRESS, $pressId); parent::deleteById($pressId); }
/** * Delete a journal by ID, INCLUDING ALL DEPENDENT ITEMS. * @param $journalId int */ function deleteById($journalId) { $journalSettingsDao = DAORegistry::getDAO('JournalSettingsDAO'); $journalSettingsDao->deleteById($journalId); $sectionDao = DAORegistry::getDAO('SectionDAO'); $sectionDao->deleteByJournalId($journalId); $issueDao = DAORegistry::getDAO('IssueDAO'); $issueDao->deleteByJournalId($journalId); $emailTemplateDao = DAORegistry::getDAO('EmailTemplateDAO'); $emailTemplateDao->deleteEmailTemplatesByContext($journalId); $subscriptionDao = DAORegistry::getDAO('IndividualSubscriptionDAO'); $subscriptionDao->deleteSubscriptionsByJournal($journalId); $subscriptionDao = DAORegistry::getDAO('InstitutionalSubscriptionDAO'); $subscriptionDao->deleteSubscriptionsByJournal($journalId); $subscriptionTypeDao = DAORegistry::getDAO('SubscriptionTypeDAO'); $subscriptionTypeDao->deleteSubscriptionTypesByJournal($journalId); $giftDao = DAORegistry::getDAO('GiftDAO'); $giftDao->deleteGiftsByAssocId(ASSOC_TYPE_JOURNAL, $journalId); $announcementDao = DAORegistry::getDAO('AnnouncementDAO'); $announcementDao->deleteByAssoc(ASSOC_TYPE_JOURNAL, $journalId); $announcementTypeDao = DAORegistry::getDAO('AnnouncementTypeDAO'); $announcementTypeDao->deleteByAssoc(ASSOC_TYPE_JOURNAL, $journalId); $articleDao = DAORegistry::getDAO('ArticleDAO'); $articleDao->deleteByContextId($journalId); $pluginSettingsDao = DAORegistry::getDAO('PluginSettingsDAO'); $pluginSettingsDao->deleteByContextId($journalId); $reviewFormDao = DAORegistry::getDAO('ReviewFormDAO'); $reviewFormDao->deleteByAssoc(ASSOC_TYPE_JOURNAL, $journalId); parent::deleteById($journalId); }
/** * Get a list of localized settings. * @return array */ function getLocaleFieldNames() { return parent::getLocaleFieldNames() + array('acronym'); }
/** * Delete a conference by ID, INCLUDING ALL DEPENDENT ITEMS. * @param $conferenceId int */ function deleteById($conferenceId) { $conferenceSettingsDao = DAORegistry::getDAO('ConferenceSettingsDAO'); $conferenceSettingsDao->deleteById($conferenceId); $emailTemplateDao = DAORegistry::getDAO('EmailTemplateDAO'); $emailTemplateDao->deleteEmailTemplatesByConference($conferenceId); $rtDao = DAORegistry::getDAO('RTDAO'); $rtDao->deleteVersionsByConference($conferenceId); $roleDao = DAORegistry::getDAO('RoleDAO'); $roleDao->deleteRoleByConferenceId($conferenceId); $groupDao = DAORegistry::getDAO('GroupDAO'); $groupDao->deleteGroupsByAssocId(ASSOC_TYPE_CONFERENCE, $conferenceId); $pluginSettingsDao = DAORegistry::getDAO('PluginSettingsDAO'); $pluginSettingsDao->deleteSettingsByConferenceId($conferenceId); $reviewFormDao = DAORegistry::getDAO('ReviewFormDAO'); $reviewFormDao->deleteByAssoc(ASSOC_TYPE_CONFERENCE, $conferenceId); $announcementDao = DAORegistry::getDAO('AnnouncementDAO'); $announcementDao->deleteByAssoc(ASSOC_TYPE_CONFERENCE, $conferenceId); $announcementTypeDao = DAORegistry::getDAO('AnnouncementTypeDAO'); $announcementTypeDao->deleteByAssoc(ASSOC_TYPE_CONFERENCE, $conferenceId); $schedConfDao = DAORegistry::getDAO('SchedConfDAO'); $schedConfDao->deleteByConferenceId($conferenceId); parent::deleteById($conferenceId); }