newDataObject(); $section->setReviewFormId($row['review_form_id']); $section->setEditorRestricted($row['editor_restricted']); $section->setSequence($row['seq']); return $section; } /** * Get the list of fields for which data can be localized. * @return array */ function getLocaleFieldNames() { return array_merge(parent::getLocaleFieldNames(), array('title')); } /** * Delete a section. * @param $section Section */ function deleteObject($section) { return $this->deleteById($section->getId(), $section->getContextId()); } /** * Delete a section by ID. * @param $sectionId int * @param $journalId int optional */ abstract function deleteById($sectionId, $contextId = null); /** * Delete sections by context ID * NOTE: This does not necessarily delete dependent entries. * @param $contextId int */ function deleteByContextId($contextId) { $sections = $this->getByContextId($contextId); while ($section = $sections->next()) { $this->deleteObject($section); } } /** * Retrieve all sections for a context. * @return DAOResultFactory containing Sections ordered by sequence */ abstract function getByContextId($contextId, $rangeInfo = null); } ?>