Open Journal Systems  2.4.4
 All Classes Namespaces Functions Variables Groups Pages
SectionDAO Class Reference
Inheritance diagram for SectionDAO:
DAO

Public Member Functions

_returnSectionFromRow (&$row)
 
 customSectionOrderingExists ($issueId)
 
 deleteCustomSection ($issueId, $sectionId)
 
 deleteCustomSectionOrdering ($issueId)
 
 deleteSection (&$section)
 
 deleteSectionById ($sectionId, $journalId=null)
 
 deleteSectionsByJournal ($journalId)
 
 getCustomSectionOrder ($issueId, $sectionId)
 
getEditorSections ($journalId)
 
 getInsertSectionId ()
 
 getJournalEmptySectionIds ($journalId)
 
getJournalSections ($journalId, $rangeInfo=null)
 
 getLocaleFieldNames ()
 
getSection ($sectionId, $journalId=null, $useCache=false)
 
getSectionByAbbrev ($sectionAbbrev, $journalId, $locale=null)
 
getSectionByTitle ($sectionTitle, $journalId, $locale=null)
 
getSectionByTitleAndAbbrev ($sectionTitle, $sectionAbbrev, $journalId, $locale)
 
getSections ($rangeInfo=null)
 
getSectionsForIssue ($issueId)
 
getSectionTitles ($journalId, $submittableOnly=false)
 
 insertCustomSectionOrder ($issueId, $sectionId, $seq)
 
 insertSection (&$section)
 
 moveCustomSectionOrder ($issueId, $sectionId, $newPos, $up)
 
 resequenceCustomSectionOrders ($issueId)
 
 resequenceSections ($journalId)
 
 sectionExists ($sectionId, $journalId)
 
 setDefaultCustomSectionOrders ($issueId)
 
 updateLocaleFields (&$section)
 
 updateSection (&$section)
 
- Public Member Functions inherited from DAO
 concat ()
 
 convertFromDB ($value, $type)
 
 convertToDB ($value, &$type)
 
 DAO ($dataSource=null, $callHooks=true)
 
 dateFromDB ($d)
 
 datetimeFromDB ($dt)
 
 datetimeToDB ($dt)
 
 dateToDB ($d)
 
 flushCache ()
 
 formatDateToDB ($date, $defaultNumWeeks=null, $acceptPastDate=true)
 
 getAffectedRows ()
 
 getDataChangedEvent ($elementId=null, $parentElementId=null)
 
getDataSource ()
 
 getDirectionMapping ($direction)
 
 getDriver ()
 
 getInsertId ($table= '', $id= '', $callHooks=true)
 
 getType ($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)
 

Additional Inherited Members

- Public Attributes inherited from DAO
 $_dataSource
 

Detailed Description

Operations for retrieving and modifying Section objects.

See Also
Section

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

Member Function Documentation

& SectionDAO::_returnSectionFromRow ( $row)

Internal function to return a Section object from a row.

Parameters
$rowarray
Returns
Section

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

References HookRegistry\call().

Referenced by getEditorSections(), getSection(), getSectionByAbbrev(), getSectionByTitle(), getSectionByTitleAndAbbrev(), and getSectionsForIssue().

SectionDAO::customSectionOrderingExists (   $issueId)

Check if an issue has custom section ordering.

Parameters
$issueIdint
Returns
boolean

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

References DAO\retrieve().

SectionDAO::deleteCustomSection (   $issueId,
  $sectionId 
)

Delete a section from the custom section order table.

Parameters
$issueIdint
$sectionIdint

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

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

SectionDAO::deleteCustomSectionOrdering (   $issueId)

Delete the custom ordering of an issue's sections.

Parameters
$issueIdint

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

References DAO\update().

SectionDAO::deleteSection ( $section)

Delete a section.

Parameters
$sectionSection

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

References deleteSectionById().

Referenced by deleteSectionsByJournal().

SectionDAO::deleteSectionById (   $sectionId,
  $journalId = null 
)

Delete a section by ID.

Parameters
$sectionIdint
$journalIdint optional

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

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

Referenced by deleteSection().

SectionDAO::deleteSectionsByJournal (   $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.

Parameters
$journalIdint

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

References deleteSection(), and getJournalSections().

SectionDAO::getCustomSectionOrder (   $issueId,
  $sectionId 
)

Get the custom section order of a section.

Parameters
$issueIdint
$sectionIdint
Returns
int

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

References DAO\retrieve().

Referenced by deleteCustomSection().

& SectionDAO::getEditorSections (   $journalId)

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

Returns
array editorId => array(sections they edit)

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

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

SectionDAO::getInsertSectionId ( )

Get the ID of the last inserted section.

Returns
int

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

References DAO\getInsertId().

Referenced by insertSection().

SectionDAO::getJournalEmptySectionIds (   $journalId)

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

Returns
array

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

References DAO\retrieve().

& SectionDAO::getJournalSections (   $journalId,
  $rangeInfo = null 
)

Retrieve all sections for a journal.

Returns
DAOResultFactory containing Sections ordered by sequence

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

References DAO\retrieveRange().

Referenced by deleteSectionsByJournal(), and getSectionTitles().

SectionDAO::getLocaleFieldNames ( )

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

Returns
array

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

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

Retrieve a section by ID.

Parameters
$sectionIdint
$journalIdint optional
$useCacheboolean optional
Returns
Section

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

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

& SectionDAO::getSectionByAbbrev (   $sectionAbbrev,
  $journalId,
  $locale = null 
)

Retrieve a section by abbreviation.

Parameters
$sectionAbbrevstring
$localestring optional
Returns
Section

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

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

& SectionDAO::getSectionByTitle (   $sectionTitle,
  $journalId,
  $locale = null 
)

Retrieve a section by title.

Parameters
$sectionTitlestring
Returns
Section

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

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

& SectionDAO::getSectionByTitleAndAbbrev (   $sectionTitle,
  $sectionAbbrev,
  $journalId,
  $locale 
)

Retrieve a section by title and abbrev.

Parameters
$sectionTitlestring
$sectionAbbrevstring
$localestring optional
Returns
Section

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

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

& SectionDAO::getSections (   $rangeInfo = null)

Retrieve all sections.

Returns
DAOResultFactory containing Sections ordered by journal ID and sequence

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

References DAO\retrieveRange().

& SectionDAO::getSectionsForIssue (   $issueId)

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

Returns
array

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

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

& SectionDAO::getSectionTitles (   $journalId,
  $submittableOnly = false 
)

Retrieve the IDs and titles of the sections for a journal in an associative array.

Returns
array

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

References getJournalSections().

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

INTERNAL USE ONLY: Insert a custom section ordering

Parameters
$issueIdint
$sectionIdint
$seqint

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

References DAO\update().

Referenced by setDefaultCustomSectionOrders().

SectionDAO::insertSection ( $section)

Insert a new section.

Parameters
$sectionSection

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

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

SectionDAO::moveCustomSectionOrder (   $issueId,
  $sectionId,
  $newPos,
  $up 
)

Move a custom issue ordering up or down, resequencing as necessary.

Parameters
$issueIdint
$sectionIdint
$newPosint The new position (0-based) of this section
$upboolean Whether we're moving the section up or down

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

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

SectionDAO::resequenceCustomSectionOrders (   $issueId)

Sequentially renumber custom section orderings in their sequence order.

Parameters
$issueIdint

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

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

Referenced by moveCustomSectionOrder().

SectionDAO::resequenceSections (   $journalId)

Sequentially renumber sections in their sequence order.

Parameters
$journalIdint

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

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

SectionDAO::sectionExists (   $sectionId,
  $journalId 
)

Check if a section exists with the specified ID.

Parameters
$sectionIdint
$journalIdint
Returns
boolean

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

References DAO\retrieve().

Referenced by deleteSectionById().

SectionDAO::setDefaultCustomSectionOrders (   $issueId)

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

Parameters
$issueIdint

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

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

SectionDAO::updateLocaleFields ( $section)

Update the localized fields for this table

Parameters
$sectionobject

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

References DAO\updateDataObjectSettings().

Referenced by insertSection(), and updateSection().

SectionDAO::updateSection ( $section)

Update an existing section.

Parameters
$sectionSection

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

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


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