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

Public Member Functions

 _fromRow ($row, $params=array(), $callHooks=true)
 
 changePubId ($pubObjectId, $pubIdType, $pubId)
 
 deleteAllPubIds ($contextId, $pubIdType)
 
 deleteById ($representationId)
 
 deletePubId ($pubObjectId, $pubIdType)
 
 getAdditionalFieldNames ()
 
 getApprovedByPublicationId ($publicationId)
 
 getByBestId ($representationId, $publicationId)
 
 getByContextId ($pressId)
 
 getById ($representationId, $publicationId=null, $contextId=null)
 
 getByPubId ($pubIdType, $pubId, $publicationId=null, $pressId=null)
 
 getByPublicationId ($publicationId, $contextId=null)
 
 getBySetting ($settingName, $settingValue, $publicationId=null, $pressId=null)
 
 getLocaleFieldNames ()
 
 insertObject ($publicationFormat)
 
 newDataObject ()
 
 pubIdExists ($pubIdType, $pubId, $excludePubObjectId, $contextId)
 
 updateLocaleFields ($publicationFormat)
 
 updateObject ($publicationFormat)
 
- 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 PublicationFormat objects.

See also
PublicationFormat

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

Member Function Documentation

◆ _fromRow()

PublicationFormatDAO::_fromRow (   $row,
  $params = array(),
  $callHooks = true 
)

Internal function to return an PublicationFormat object from a row.

Parameters
$rowarray
$callHooksboolean
Returns
PublicationFormat

Definition at line 253 of file PublicationFormatDAO.inc.php.

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

Referenced by getByBestId(), getById(), and getBySetting().

◆ changePubId()

PublicationFormatDAO::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 456 of file PublicationFormatDAO.inc.php.

References DAO\replace().

◆ deleteAllPubIds()

PublicationFormatDAO::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 488 of file PublicationFormatDAO.inc.php.

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

◆ deleteById()

PublicationFormatDAO::deleteById (   $representationId)

Delete an publication format by ID.

Parameters
$representationIdint

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

References DAO\update().

◆ deletePubId()

PublicationFormatDAO::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 473 of file PublicationFormatDAO.inc.php.

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

◆ getAdditionalFieldNames()

PublicationFormatDAO::getAdditionalFieldNames ( )
See also
DAO::getAdditionalFieldNames()

Reimplemented from DAO.

Definition at line 421 of file PublicationFormatDAO.inc.php.

◆ getApprovedByPublicationId()

PublicationFormatDAO::getApprovedByPublicationId (   $publicationId)

Retrieves a list of approved publication formats for a publication

Parameters
int$publicationId
Returns
DAOResultFactory (PublicationFormat)

Definition at line 203 of file PublicationFormatDAO.inc.php.

References DAO\retrieve().

◆ getByBestId()

PublicationFormatDAO::getByBestId (   $representationId,
  $publicationId 
)

Retrieve publication format by public ID or, failing that, internal ID; public ID takes precedence.

Parameters
$representationIdstring
$publicationIdint
Returns
PublicationFormat|null

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

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

◆ getByContextId()

PublicationFormatDAO::getByContextId (   $pressId)

Retrieves a list of publication formats for a press

Parameters
intpressId
Returns
DAOResultFactory (PublicationFormat)

Definition at line 183 of file PublicationFormatDAO.inc.php.

References DAO\retrieve().

Referenced by deleteAllPubIds().

◆ getById()

PublicationFormatDAO::getById (   $representationId,
  $publicationId = null,
  $contextId = null 
)

Retrieves a representation by ID.

Parameters
$representationIdint Representation ID.
$publicationIdint Optional publication ID.
$contextIdint Optional context ID.
Returns
DAOResultFactory

Reimplemented from RepresentationDAO.

Definition at line 24 of file PublicationFormatDAO.inc.php.

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

Referenced by getByBestId().

◆ getByPubId()

PublicationFormatDAO::getByPubId (   $pubIdType,
  $pubId,
  $publicationId = null,
  $pressId = null 
)

Retrieve publication format by public ID

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
$publicationIdint optional
$pressIdint optional
Returns
PublicationFormat|null

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

References getBySetting().

◆ getByPublicationId()

PublicationFormatDAO::getByPublicationId (   $publicationId,
  $contextId = null 
)

Retrieves an iterator of representations for a publication

Parameters
$publicationIdint
$contextIdint
Returns
DAOResultFactory

Reimplemented from RepresentationDAO.

Definition at line 156 of file PublicationFormatDAO.inc.php.

References DAO\retrieve().

◆ getBySetting()

PublicationFormatDAO::getBySetting (   $settingName,
  $settingValue,
  $publicationId = null,
  $pressId = null 
)

Find publication format by querying publication format settings.

Parameters
$settingNamestring
$settingValuemixed
$publicationIdint optional
$pressIdint optional
Returns
array The publication formats identified by setting.

Definition at line 58 of file PublicationFormatDAO.inc.php.

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

Referenced by getByPubId().

◆ getLocaleFieldNames()

PublicationFormatDAO::getLocaleFieldNames ( )

Get a list of fields for which we store localized data

Returns
array

Reimplemented from DAO.

Definition at line 414 of file PublicationFormatDAO.inc.php.

◆ insertObject()

PublicationFormatDAO::insertObject (   $publicationFormat)

Insert a publication format.

Parameters
$publicationFormatPublicationFormat
Returns
int the publication format id.

Definition at line 302 of file PublicationFormatDAO.inc.php.

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

◆ newDataObject()

PublicationFormatDAO::newDataObject ( )

Construct a new data object corresponding to this DAO.

Returns
PublicationFormat

Definition at line 243 of file PublicationFormatDAO.inc.php.

Referenced by _fromRow().

◆ pubIdExists()

PublicationFormatDAO::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 430 of file PublicationFormatDAO.inc.php.

References DAO\retrieve().

◆ updateLocaleFields()

PublicationFormatDAO::updateLocaleFields (   $publicationFormat)

Update the settings for this object

Parameters
$publicationFormatobject

Definition at line 231 of file PublicationFormatDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertObject(), and updateObject().

◆ updateObject()

PublicationFormatDAO::updateObject (   $publicationFormat)

Update an existing publication format.

Parameters
$publicationFormatPublicationFormat

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

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


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