Open Monograph Press  3.3.0
ChapterDAO Class Reference
Inheritance diagram for ChapterDAO:
DAO PKPPubIdPluginDAO

Public Member Functions

 _fromRow ($row)
 
 changePubId ($pubObjectId, $pubIdType, $pubId)
 
 deleteAllPubIds ($contextId, $pubIdType)
 
 deleteById ($chapterId)
 
 deleteObject ($chapter)
 
 deletePubId ($pubObjectId, $pubIdType)
 
 getAdditionalFieldNames ()
 
 getByContextId ($pressId)
 
 getByPublicationId ($publicationId, $orderBySequence=true)
 
 getChapter ($chapterId, $publicationId=null)
 
 getInsertId ()
 
 getLocaleFieldNames ()
 
 insertChapter ($chapter)
 
 newDataObject ()
 
 pubIdExists ($pubIdType, $pubId, $excludePubObjectId, $contextId)
 
 resequenceChapters ($publicationId)
 
 updateLocaleFields ($chapter)
 
 updateObject ($chapter)
 
- 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)
 
 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)
 

Additional Inherited Members

- Static Public Member Functions inherited from DAO
static getDataChangedEvent ($elementId=null, $parentElementId=null, $content='')
 
- Data Fields inherited from DAO
 $_dataSource
 
- Protected Member Functions inherited from DAO
 _getInsertId ($table='', $id='')
 

Detailed Description

Operations for retrieving and modifying ChapterAuthor objects.

Operations for retrieving and modifying Chapter objects.

@inchapter monograph

See also
Chapter
ChapterDAO
AuthorDAO - This DAO does NOT offer operations for manipulating Author Objects. AuthorDAO should be used for that instead.
Chapter
AuthorDAO

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

Member Function Documentation

◆ _fromRow()

ChapterDAO::_fromRow (   $row)

Internal function to return a Chapter object from a row.

Parameters
$rowarray
Returns
Chapter

Definition at line 120 of file ChapterDAO.inc.php.

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

Referenced by getChapter().

◆ changePubId()

ChapterDAO::changePubId (   $pubObjectId,
  $pubIdType,
  $pubId 
)

Change the public ID of a submission.

Parameters
$pubObjectIdint ID of the pub object
$pubIdTypestring One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see http://dtd.nlm.nih.gov/publishing/tag-library/n-4zh0.html).
$pubIdstring

Reimplemented from PKPPubIdPluginDAO.

Definition at line 274 of file ChapterDAO.inc.php.

References DAO\replace().

◆ deleteAllPubIds()

ChapterDAO::deleteAllPubIds (   $contextId,
  $pubIdType 
)

Delete the public IDs of all submissions in this context.

Parameters
$contextIdint
$pubIdTypestring One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see http://dtd.nlm.nih.gov/publishing/tag-library/n-4zh0.html).

Reimplemented from PKPPubIdPluginDAO.

Definition at line 306 of file ChapterDAO.inc.php.

References DAO\flushCache(), getByContextId(), and DAO\update().

◆ deleteById()

ChapterDAO::deleteById (   $chapterId)

Delete a board chapter, including membership info

Parameters
$chapterIdint

Definition at line 196 of file ChapterDAO.inc.php.

References DAO\update().

Referenced by deleteObject().

◆ deleteObject()

ChapterDAO::deleteObject (   $chapter)

Delete a board chapter, including membership info

Parameters
$chapterChapter

Definition at line 188 of file ChapterDAO.inc.php.

References deleteById().

◆ deletePubId()

ChapterDAO::deletePubId (   $pubObjectId,
  $pubIdType 
)

Delete the public ID of a submission.

Parameters
$pubObjectIdint ID of the pub object
$pubIdTypestring One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see http://dtd.nlm.nih.gov/publishing/tag-library/n-4zh0.html).

Reimplemented from PKPPubIdPluginDAO.

Definition at line 291 of file ChapterDAO.inc.php.

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

◆ getAdditionalFieldNames()

ChapterDAO::getAdditionalFieldNames ( )

Get a list of additional fields that do not have dedicated accessors.

Returns
array

Reimplemented from DAO.

Definition at line 98 of file ChapterDAO.inc.php.

◆ getByContextId()

ChapterDAO::getByContextId (   $pressId)

Retrieve all chapters of a press.

Parameters
$pressIdint
Returns
DAOResultFactory

Definition at line 72 of file ChapterDAO.inc.php.

References DAO\retrieve().

Referenced by deleteAllPubIds().

◆ getByPublicationId()

ChapterDAO::getByPublicationId (   $publicationId,
  $orderBySequence = true 
)

Retrieve all chapters of a publication.

Parameters
$publicationIdint
$orderBySequenceboolean
Returns
DAOResultFactory

Definition at line 54 of file ChapterDAO.inc.php.

References DAO\retrieve().

◆ getChapter()

ChapterDAO::getChapter (   $chapterId,
  $publicationId = null 
)

Retrieve a chapter by ID.

Parameters
$chapterIdint
$publicationIdint optional
Returns
Chapter

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

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

◆ getInsertId()

ChapterDAO::getInsertId ( )

Get the ID of the last inserted board chapter.

Returns
int

Definition at line 241 of file ChapterDAO.inc.php.

References DAO\_getInsertId().

Referenced by insertChapter().

◆ getLocaleFieldNames()

ChapterDAO::getLocaleFieldNames ( )

Get the list of fields for which locale data is stored.

Returns
array

Reimplemented from DAO.

Definition at line 89 of file ChapterDAO.inc.php.

◆ insertChapter()

ChapterDAO::insertChapter (   $chapter)

Insert a new board chapter.

Parameters
$chapterChapter

Definition at line 147 of file ChapterDAO.inc.php.

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

◆ newDataObject()

ChapterDAO::newDataObject ( )

Get a new data object

Returns
Chapter

Definition at line 111 of file ChapterDAO.inc.php.

Referenced by _fromRow().

◆ pubIdExists()

ChapterDAO::pubIdExists (   $pubIdType,
  $pubId,
  $excludePubObjectId,
  $contextId 
)

Checks if public identifier exists (other than for the specified submission ID, which is treated as an exception).

Parameters
$pubIdTypestring One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see http://dtd.nlm.nih.gov/publishing/tag-library/n-4zh0.html).
$pubIdstring
$excludePubObjectIdint ID of the pub object to be excluded from the search.
$contextIdint
Returns
boolean

Reimplemented from PKPPubIdPluginDAO.

Definition at line 248 of file ChapterDAO.inc.php.

References DAO\retrieve().

◆ resequenceChapters()

ChapterDAO::resequenceChapters (   $publicationId)

Sequentially renumber chapters in their sequence order, optionally by monographId

Parameters
$publicationIdint

Definition at line 207 of file ChapterDAO.inc.php.

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

◆ updateLocaleFields()

ChapterDAO::updateLocaleFields (   $chapter)

Update the settings for this object

Parameters
$chapterobject

Definition at line 137 of file ChapterDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertChapter(), and updateObject().

◆ updateObject()

ChapterDAO::updateObject (   $chapter)

Update an existing board chapter.

Parameters
$chapterChapter

Definition at line 168 of file ChapterDAO.inc.php.

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


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