PHP Class SectionDAO, ojs

Inheritance: extends PKPSectionDAO
Mostrar archivo Open project: pkp/ojs Class Usage Examples

Public Properties

Property Type Description
$cache

Public Methods

Method Description
__construct ( )
_cacheMiss ( $cache, $id )
_fromRow ( $row ) : Section Internal function to return a Section object from a row.
_getCache ( )
customSectionOrderingExists ( $issueId ) : boolean Check if an issue has custom section ordering.
deleteById ( $sectionId, $contextId = null ) Delete a section by ID.
deleteByJournalId ( $journalId ) Delete sections by journal ID NOTE: This does not delete dependent entries EXCEPT from section_editors. It is intended to be called only when deleting a journal.
deleteCustomSection ( $issueId, $sectionId ) Delete a section from the custom section order table.
deleteCustomSectionOrdering ( $issueId ) Delete the custom ordering of an issue's sections.
getAll ( $rangeInfo = null ) : DAOResultFactory Retrieve all sections.
getByAbbrev ( $sectionAbbrev, $journalId, $locale = null ) : Section Retrieve a section by abbreviation.
getByContextId ( $journalId, $rangeInfo = null ) : DAOResultFactory Retrieve all sections for a journal.
getById ( $sectionId, $journalId = null, $useCache = false ) : Section Retrieve a section by ID.
getByIssueId ( $issueId ) : array Retrieve all sections in which articles are currently published in the given issue.
getByJournalId ( $journalId, $rangeInfo = null ) : DAOResultFactory Retrieve all sections for a journal.
getByTitle ( $sectionTitle, $journalId, $locale = null ) : Section Retrieve a section by title.
getCustomSectionOrder ( $issueId, $sectionId ) : integer Get the custom section order of a section.
getEditorSections ( $journalId ) : array Retrieve an array associating all section editor IDs with arrays containing the sections they edit.
getEmptyByJournalId ( $journalId ) : array Retrieve all empty (without articles) section ids for a journal.
getInsertId ( ) : integer Get the ID of the last inserted section.
getLocaleFieldNames ( ) : array Get the list of fields for which data can be localized.
getTitles ( $journalId, $submittableOnly = false ) : array Retrieve the IDs and titles of the sections for a journal in an associative array.
insertCustomSectionOrder ( $issueId, $sectionId, $seq ) INTERNAL USE ONLY: Insert a custom section ordering
insertObject ( $section ) Insert a new section.
newDataObject ( ) Return a new data object.
resequenceCustomSectionOrders ( $issueId ) Sequentially renumber custom section orderings in their sequence order.
resequenceSections ( $journalId ) Sequentially renumber sections in their sequence order.
sectionExists ( $sectionId, $journalId ) : boolean Check if a section exists with the specified ID.
setDefaultCustomSectionOrders ( $issueId ) Import the current section orders into the specified issue as custom issue orderings.
updateCustomSectionOrder ( $issueId, $sectionId, $seq ) Update a custom section ordering
updateLocaleFields ( $section ) Update the localized fields for this table
updateObject ( $section ) Update an existing section.

Method Details

__construct() public method

public __construct ( )

_cacheMiss() public method

public _cacheMiss ( $cache, $id )

_fromRow() public method

Internal function to return a Section object from a row.
public _fromRow ( $row ) : Section
$row array
return Section

_getCache() public method

public _getCache ( )

customSectionOrderingExists() public method

Check if an issue has custom section ordering.
public customSectionOrderingExists ( $issueId ) : boolean
$issueId int
return boolean

deleteById() public method

Delete a section by ID.
public deleteById ( $sectionId, $contextId = null )
$sectionId int
$contextId int optional

deleteByJournalId() public method

Delete sections by journal ID NOTE: This does not delete dependent entries EXCEPT from section_editors. It is intended to be called only when deleting a journal.
public deleteByJournalId ( $journalId )
$journalId int

deleteCustomSection() public method

Delete a section from the custom section order table.
public deleteCustomSection ( $issueId, $sectionId )
$issueId int
$sectionId int

deleteCustomSectionOrdering() public method

Delete the custom ordering of an issue's sections.
public deleteCustomSectionOrdering ( $issueId )
$issueId int

getAll() public method

Retrieve all sections.
public getAll ( $rangeInfo = null ) : DAOResultFactory
return DAOResultFactory containing Sections ordered by journal ID and sequence

getByAbbrev() public method

Retrieve a section by abbreviation.
public getByAbbrev ( $sectionAbbrev, $journalId, $locale = null ) : Section
$sectionAbbrev string
$locale string optional
return Section

getByContextId() public method

Retrieve all sections for a journal.
public getByContextId ( $journalId, $rangeInfo = null ) : DAOResultFactory
$journalId int Journal ID
$rangeInfo Object
return DAOResultFactory containing Sections ordered by sequence

getById() public method

Retrieve a section by ID.
public getById ( $sectionId, $journalId = null, $useCache = false ) : Section
$sectionId int
$journalId int optional
$useCache boolean optional
return Section

getByIssueId() public method

Retrieve all sections in which articles are currently published in the given issue.
public getByIssueId ( $issueId ) : array
return array

getByJournalId() public method

Retrieve all sections for a journal.
public getByJournalId ( $journalId, $rangeInfo = null ) : DAOResultFactory
return DAOResultFactory containing Sections ordered by sequence

getByTitle() public method

Retrieve a section by title.
public getByTitle ( $sectionTitle, $journalId, $locale = null ) : Section
$sectionTitle string
return Section

getCustomSectionOrder() public method

Get the custom section order of a section.
public getCustomSectionOrder ( $issueId, $sectionId ) : integer
$issueId int
$sectionId int
return integer

getEditorSections() public method

Retrieve an array associating all section editor IDs with arrays containing the sections they edit.
public getEditorSections ( $journalId ) : array
return array editorId => array(sections they edit)

getEmptyByJournalId() public method

Retrieve all empty (without articles) section ids for a journal.
public getEmptyByJournalId ( $journalId ) : array
return array

getInsertId() public method

Get the ID of the last inserted section.
public getInsertId ( ) : integer
return integer

getLocaleFieldNames() public method

Get the list of fields for which data can be localized.
public getLocaleFieldNames ( ) : array
return array

getTitles() public method

Retrieve the IDs and titles of the sections for a journal in an associative array.
public getTitles ( $journalId, $submittableOnly = false ) : array
return array

insertCustomSectionOrder() public method

INTERNAL USE ONLY: Insert a custom section ordering
public insertCustomSectionOrder ( $issueId, $sectionId, $seq )
$issueId int
$sectionId int
$seq int

insertObject() public method

Insert a new section.
public insertObject ( $section )
$section Section

newDataObject() public method

Return a new data object.
public newDataObject ( )

resequenceCustomSectionOrders() public method

Sequentially renumber custom section orderings in their sequence order.
public resequenceCustomSectionOrders ( $issueId )
$issueId int

resequenceSections() public method

Sequentially renumber sections in their sequence order.
public resequenceSections ( $journalId )
$journalId int

sectionExists() public method

Check if a section exists with the specified ID.
public sectionExists ( $sectionId, $journalId ) : boolean
$sectionId int
$journalId int
return boolean

setDefaultCustomSectionOrders() public method

Import the current section orders into the specified issue as custom issue orderings.
public setDefaultCustomSectionOrders ( $issueId )
$issueId int

updateCustomSectionOrder() public method

Update a custom section ordering
public updateCustomSectionOrder ( $issueId, $sectionId, $seq )
$issueId int
$sectionId int
$seq int

updateLocaleFields() public method

Update the localized fields for this table
public updateLocaleFields ( $section )
$section object

updateObject() public method

Update an existing section.
public updateObject ( $section )
$section Section

Property Details

$cache public_oe property

public $cache