Open Journal Systems  3.3.0
SectionDAO Class Reference
Inheritance diagram for SectionDAO:
PKPSectionDAO DAO

Public Member Functions

 _cacheMiss ($cache, $id)
 
 _fromRow ($row)
 
_getCache ()
 
 customSectionOrderingExists ($issueId)
 
 deleteById ($sectionId, $contextId=null)
 
 deleteByJournalId ($journalId)
 
 deleteCustomSection ($issueId, $sectionId)
 
 deleteCustomSectionOrdering ($issueId)
 
 getAll ($rangeInfo=null)
 
 getByAbbrev ($sectionAbbrev, $journalId, $locale=null)
 
 getByContextId ($journalId, $rangeInfo=null, $submittableOnly=false)
 
 getById ($sectionId, $journalId=null, $useCache=false)
 
 getByIssueId ($issueId)
 
 getByJournalId ($journalId, $rangeInfo=null)
 
 getBySubmissionId ($submissionId)
 
 getByTitle ($sectionTitle, $journalId, $locale=null)
 
 getCustomSectionOrder ($issueId, $sectionId)
 
 getEditorSections ($journalId)
 
 getEmptyByJournalId ($journalId)
 
 getInsertId ()
 
 getLocaleFieldNames ()
 
 insertCustomSectionOrder ($issueId, $sectionId, $seq)
 
 insertObject ($section)
 
 newDataObject ()
 
 resequenceCustomSectionOrders ($issueId)
 
 resequenceSections ($journalId)
 
 sectionExists ($sectionId, $journalId)
 
 setDefaultCustomSectionOrders ($issueId)
 
 updateCustomSectionOrder ($issueId, $sectionId, $seq)
 
 updateLocaleFields ($section)
 
 updateObject ($section)
 
- Public Member Functions inherited from PKPSectionDAO
 deleteByContextId ($contextId)
 
 deleteObject ($section)
 
 getById ($sectionId, $contextId=null)
 
 getTitlesByContextId ($contextId, $submittableOnly=false)
 
- Public Member Functions inherited from DAO
 __construct ($dataSource=null, $callHooks=true)
 
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAdditionalFieldNames ()
 
 getAffectedRows ()
 
 getDataObjectSettings ($tableName, $idFieldName, $idFieldValue, $dataObject)
 
 getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getType ($value)
 
 handleError ($dataSource, $sql)
 
 nullOrInt ($value)
 
 replace ($table, $arrFields, $keyCols)
 
retrieve ($sql, $params=false, $callHooks=true)
 
retrieveCached ($sql, $params=false, $secsToCache=3600, $callHooks=true)
 
retrieveLimit ($sql, $params=false, $numRows=false, $offset=false, $callHooks=true)
 
retrieveRange ($sql, $params=false, $dbResultRange=null, $callHooks=true)
 
 setCacheDir ()
 
 setDataSource ($dataSource)
 
 update ($sql, $params=false, $callHooks=true, $dieOnError=true)
 
 updateDataObjectSettings ($tableName, $dataObject, $idArray)
 

Data Fields

 $cache
 
- Data Fields inherited from DAO
 $_dataSource
 

Protected Member Functions

 _getContextIdColumnName ()
 
 _getTableName ()
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table='', $id='')
 

Additional Inherited Members

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null, $content='')
 

Detailed Description

Operations for retrieving and modifying Section objects.

See also
Section

Definition at line 20 of file SectionDAO.inc.php.

Member Function Documentation

◆ _cacheMiss()

SectionDAO::_cacheMiss (   $cache,
  $id 
)

Definition at line 41 of file SectionDAO.inc.php.

References $cache, and getById().

◆ _fromRow()

SectionDAO::_fromRow (   $row)

Internal function to return a Section object from a row.

Parameters
$rowarray
Returns
Section

Reimplemented from PKPSectionDAO.

Definition at line 186 of file SectionDAO.inc.php.

References HookRegistry\call(), and DAO\getDataObjectSettings().

Referenced by getByAbbrev(), getById(), getByIssueId(), getBySubmissionId(), getByTitle(), and getEditorSections().

◆ _getCache()

& SectionDAO::_getCache ( )

Definition at line 47 of file SectionDAO.inc.php.

References $cache, and CacheManager\getManager().

Referenced by getById().

◆ _getContextIdColumnName()

SectionDAO::_getContextIdColumnName ( )
protected

Get the name of the context ID table column

Returns
string

Definition at line 37 of file SectionDAO.inc.php.

◆ _getTableName()

SectionDAO::_getTableName ( )
protected

Get the name of the section table in the database

Returns
string

Definition at line 28 of file SectionDAO.inc.php.

◆ customSectionOrderingExists()

SectionDAO::customSectionOrderingExists (   $issueId)

Check if an issue has custom section ordering.

Parameters
$issueIdint
Returns
boolean

Definition at line 568 of file SectionDAO.inc.php.

References DAO\retrieve().

◆ deleteById()

SectionDAO::deleteById (   $sectionId,
  $contextId = null 
)

Delete a section by ID.

Parameters
$sectionIdint Section ID
$contextIdint optional

Reimplemented from PKPSectionDAO.

Definition at line 299 of file SectionDAO.inc.php.

References DAORegistry\getDAO(), sectionExists(), and DAO\update().

◆ deleteByJournalId()

SectionDAO::deleteByJournalId (   $journalId)

Delete sections by journal ID NOTE: This does not delete dependent entries EXCEPT from subeditor_submission_group. It is intended to be called only when deleting a journal.

Parameters
$journalIdint Journal ID

Definition at line 318 of file SectionDAO.inc.php.

References PKPSectionDAO\deleteByContextId().

◆ deleteCustomSection()

SectionDAO::deleteCustomSection (   $issueId,
  $sectionId 
)

Delete a section from the custom section order table.

Parameters
$issueIdint
$sectionIdint

Definition at line 526 of file SectionDAO.inc.php.

References getCustomSectionOrder(), and DAO\update().

◆ deleteCustomSectionOrdering()

SectionDAO::deleteCustomSectionOrdering (   $issueId)

Delete the custom ordering of an issue's sections.

Parameters
$issueIdint
Returns
boolean

Definition at line 515 of file SectionDAO.inc.php.

References DAO\update().

◆ getAll()

SectionDAO::getAll (   $rangeInfo = null)

Retrieve all sections.

Parameters
$rangeInfoDBResultRange optional
Returns
DAOResultFactory containing Sections ordered by journal ID and sequence

Definition at line 431 of file SectionDAO.inc.php.

References DAO\retrieveRange().

◆ getByAbbrev()

SectionDAO::getByAbbrev (   $sectionAbbrev,
  $journalId,
  $locale = null 
)

Retrieve a section by abbreviation.

Parameters
$sectionAbbrevstring
$journalIdint Journal ID
$localestring optional
Returns
Section

Definition at line 94 of file SectionDAO.inc.php.

References _fromRow(), and DAO\retrieve().

◆ getByContextId()

SectionDAO::getByContextId (   $journalId,
  $rangeInfo = null,
  $submittableOnly = false 
)

Retrieve all sections for a journal.

Parameters
$journalIdint Journal ID
$rangeInfoDBResultRange optional
$submittableOnlyboolean optional. Whether to return only sections that can be submitted to by anyone.
Returns
DAOResultFactory containing Sections ordered by sequence

Reimplemented from PKPSectionDAO.

Definition at line 417 of file SectionDAO.inc.php.

References DAO\retrieveRange().

Referenced by getByJournalId().

◆ getById()

SectionDAO::getById (   $sectionId,
  $journalId = null,
  $useCache = false 
)

Retrieve a section by ID.

Parameters
$sectionIdint
$journalIdint Journal ID optional
$useCacheboolean optional
Returns
Section

Definition at line 62 of file SectionDAO.inc.php.

References $cache, _fromRow(), _getCache(), and DAO\retrieve().

Referenced by _cacheMiss().

◆ getByIssueId()

SectionDAO::getByIssueId (   $issueId)

Retrieve all sections in which articles are currently published in the given issue.

Parameters
$issueIdint Issue ID
Returns
array

Definition at line 358 of file SectionDAO.inc.php.

References _fromRow(), PKPServices\get(), and DAO\retrieve().

Referenced by setDefaultCustomSectionOrders().

◆ getByJournalId()

SectionDAO::getByJournalId (   $journalId,
  $rangeInfo = null 
)

Retrieve all sections for a journal.

Parameters
$journalIdint Journal ID
$rangeInfoDBResultRange optional
Returns
DAOResultFactory containing Sections ordered by sequence

Definition at line 405 of file SectionDAO.inc.php.

References getByContextId().

◆ getBySubmissionId()

SectionDAO::getBySubmissionId (   $submissionId)

Retrieve section a submission is assigned to.

Parameters
$submissionIdint Submission id
Returns
Section

Definition at line 158 of file SectionDAO.inc.php.

References _fromRow(), and DAO\retrieve().

◆ getByTitle()

SectionDAO::getByTitle (   $sectionTitle,
  $journalId,
  $locale = null 
)

Retrieve a section by title.

Parameters
$sectionTitlestring
$journalIdint Journal ID
$localestring optional
Returns
Section

Definition at line 127 of file SectionDAO.inc.php.

References _fromRow(), and DAO\retrieve().

◆ getCustomSectionOrder()

SectionDAO::getCustomSectionOrder (   $issueId,
  $sectionId 
)

Get the custom section order of a section.

Parameters
$issueIdint
$sectionIdint
Returns
int

Definition at line 584 of file SectionDAO.inc.php.

References DAO\retrieve().

Referenced by deleteCustomSection().

◆ getEditorSections()

SectionDAO::getEditorSections (   $journalId)

Retrieve an array associating all section editor IDs with arrays containing the sections they edit.

Parameters
$journalIdint Journal ID
Returns
array editorId => array(sections they edit)

Definition at line 328 of file SectionDAO.inc.php.

References _fromRow(), and DAO\retrieve().

◆ getEmptyByJournalId()

SectionDAO::getEmptyByJournalId (   $journalId)

Retrieve all empty (without articles) section ids for a journal.

Parameters
$journalIdint Journal ID
Returns
array

Definition at line 445 of file SectionDAO.inc.php.

References DAO\retrieve().

◆ getInsertId()

SectionDAO::getInsertId ( )

Get the ID of the last inserted section.

Returns
int

Definition at line 506 of file SectionDAO.inc.php.

References DAO\_getInsertId().

Referenced by insertObject().

◆ getLocaleFieldNames()

SectionDAO::getLocaleFieldNames ( )

Get the list of fields for which data can be localized.

Returns
array

Reimplemented from PKPSectionDAO.

Definition at line 210 of file SectionDAO.inc.php.

◆ insertCustomSectionOrder()

SectionDAO::insertCustomSectionOrder (   $issueId,
  $sectionId,
  $seq 
)

INTERNAL USE ONLY: Insert a custom section ordering

Parameters
$issueIdint
$sectionIdint
$seqint

Definition at line 618 of file SectionDAO.inc.php.

References DAO\update().

Referenced by setDefaultCustomSectionOrders().

◆ insertObject()

SectionDAO::insertObject (   $section)

Insert a new section.

Parameters
$sectionSection
Returns
int new Section ID

Definition at line 232 of file SectionDAO.inc.php.

References getInsertId(), DAO\update(), and updateLocaleFields().

◆ newDataObject()

SectionDAO::newDataObject ( )

Return a new data object.

Reimplemented from PKPSectionDAO.

Definition at line 177 of file SectionDAO.inc.php.

◆ resequenceCustomSectionOrders()

SectionDAO::resequenceCustomSectionOrders (   $issueId)

Sequentially renumber custom section orderings in their sequence order.

Parameters
$issueIdint

Definition at line 545 of file SectionDAO.inc.php.

References DAO\retrieve(), and DAO\update().

◆ resequenceSections()

SectionDAO::resequenceSections (   $journalId)

Sequentially renumber sections in their sequence order.

Parameters
$journalIdint Journal ID

Definition at line 481 of file SectionDAO.inc.php.

References DAO\retrieve(), and DAO\update().

◆ sectionExists()

SectionDAO::sectionExists (   $sectionId,
  $journalId 
)

Check if a section exists with the specified ID.

Parameters
$sectionIdint Section ID
$journalIdint Journal ID
Returns
boolean

Definition at line 466 of file SectionDAO.inc.php.

References DAO\retrieve().

Referenced by deleteById().

◆ setDefaultCustomSectionOrders()

SectionDAO::setDefaultCustomSectionOrders (   $issueId)

Import the current section orders into the specified issue as custom issue orderings.

Parameters
$issueIdint

Definition at line 603 of file SectionDAO.inc.php.

References getByIssueId(), and insertCustomSectionOrder().

◆ updateCustomSectionOrder()

SectionDAO::updateCustomSectionOrder (   $issueId,
  $sectionId,
  $seq 
)

Update a custom section ordering

Parameters
$issueIdint
$sectionIdint
$seqint

Definition at line 631 of file SectionDAO.inc.php.

References DAO\update().

◆ updateLocaleFields()

SectionDAO::updateLocaleFields (   $section)

Update the localized fields for this table

Parameters
$sectionobject

Definition at line 221 of file SectionDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertObject(), and updateObject().

◆ updateObject()

SectionDAO::updateObject (   $section)

Update an existing section.

Parameters
$sectionSection

Definition at line 262 of file SectionDAO.inc.php.

References DAO\update(), and updateLocaleFields().

Field Documentation

◆ $cache

SectionDAO::$cache

Definition at line 21 of file SectionDAO.inc.php.

Referenced by _cacheMiss(), _getCache(), and getById().


The documentation for this class was generated from the following file: