Open Journal Systems  2.4.3
 All Classes Namespaces Functions Variables Groups Pages
ArticleGalleyDAO Class Reference
Inheritance diagram for ArticleGalleyDAO:
DAO ArticleXMLGalleyDAO

Public Member Functions

_returnGalleyFromRow (&$row)
 
 ArticleGalleyDAO ()
 
 changePubId ($galleyId, $pubIdType, $pubId)
 
 deleteAllPubIds ($journalId, $pubIdType)
 
 deleteGalley (&$galley)
 
 deleteGalleyById ($galleyId, $articleId=null)
 
 deleteGalleyImage ($galleyId, $fileId)
 
 deleteGalleysByArticle ($articleId)
 
 deleteImagesByGalley ($galleyId)
 
 galleyExistsByFileId ($articleId, $fileId)
 
 getAdditionalFieldNames ()
 
getGalley ($galleyId, $articleId=null)
 
getGalleyByBestGalleyId ($galleyId, $articleId)
 
getGalleyByPubId ($pubIdType, $pubId, $articleId=null)
 
getGalleyImages ($galleyId)
 
getGalleysByArticle ($articleId)
 
getGalleysByJournalId ($journalId)
 
getGalleysBySetting ($settingName, $settingValue, $articleId=null, $journalId=null)
 
 getInsertGalleyId ()
 
 getLocaleFieldNames ()
 
 getNextGalleySequence ($articleId)
 
 incrementViews ($galleyId)
 
 insertGalley (&$galley)
 
 insertGalleyImage ($galleyId, $fileId)
 
 pubIdExists ($pubIdType, $pubId, $galleyId, $journalId)
 
 resequenceGalleys ($articleId)
 
 updateGalley (&$galley)
 
 updateLocaleFields (&$galley)
 
- 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)
 

Public Attributes

 $articleFileDao
 
- Public Attributes inherited from DAO
 $_dataSource
 

Detailed Description

Operations for retrieving and modifying ArticleGalley/ArticleHTMLGalley objects.

See Also
ArticleGalley

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

Member Function Documentation

& ArticleGalleyDAO::_returnGalleyFromRow ( $row)

Internal function to return an ArticleGalley object from a row.

Parameters
$rowarray
Returns
ArticleGalley

Definition at line 260 of file ArticleGalleyDAO.inc.php.

References HookRegistry\call(), DAO\datetimeFromDB(), and getGalleyImages().

Referenced by ArticleXMLGalleyDAO\_getXMLGalleyFromId(), getGalley(), getGalleysByArticle(), and getGalleysBySetting().

ArticleGalleyDAO::ArticleGalleyDAO ( )

Constructor.

Definition at line 27 of file ArticleGalleyDAO.inc.php.

References DAORegistry\getDAO().

ArticleGalleyDAO::changePubId (   $galleyId,
  $pubIdType,
  $pubId 
)

Change the public ID of a galley.

Parameters
$galleyIdint
$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

Definition at line 565 of file ArticleGalleyDAO.inc.php.

References DAO\replace().

ArticleGalleyDAO::deleteAllPubIds (   $journalId,
  $pubIdType 
)

Delete the public IDs of all galleys in a journal.

Parameters
$journalIdint
$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).

Definition at line 586 of file ArticleGalleyDAO.inc.php.

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

ArticleGalleyDAO::deleteGalley ( $galley)

Delete an ArticleGalley.

Parameters
$galleyArticleGalley

Definition at line 364 of file ArticleGalleyDAO.inc.php.

References deleteGalleyById().

ArticleGalleyDAO::deleteGalleyById (   $galleyId,
  $articleId = null 
)

Delete a galley by ID.

Parameters
$galleyIdint
$articleIdint optional

Definition at line 373 of file ArticleGalleyDAO.inc.php.

References HookRegistry\call(), deleteImagesByGalley(), DAO\getAffectedRows(), and DAO\update().

Referenced by deleteGalley(), and deleteGalleysByArticle().

ArticleGalleyDAO::deleteGalleyImage (   $galleyId,
  $fileId 
)

Delete an image from an HTML galley.

Parameters
$galleyIdint
$fileIdint

Definition at line 538 of file ArticleGalleyDAO.inc.php.

References DAO\update().

ArticleGalleyDAO::deleteGalleysByArticle (   $articleId)

Delete galleys (and dependent galley image entries) by article. NOTE that this will not delete article_file entities or the respective files.

Parameters
$articleIdint

Definition at line 398 of file ArticleGalleyDAO.inc.php.

References deleteGalleyById(), and getGalleysByArticle().

ArticleGalleyDAO::deleteImagesByGalley (   $galleyId)

Delete HTML galley images by galley.

Parameters
$galleyIdint

Definition at line 550 of file ArticleGalleyDAO.inc.php.

References DAO\update().

Referenced by deleteGalleyById().

ArticleGalleyDAO::galleyExistsByFileId (   $articleId,
  $fileId 
)

Check if a galley exists with the associated file ID.

Parameters
$articleIdint
$fileIdint
Returns
boolean

Definition at line 411 of file ArticleGalleyDAO.inc.php.

References DAO\retrieve().

ArticleGalleyDAO::getAdditionalFieldNames ( )

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

Returns
array

Definition at line 238 of file ArticleGalleyDAO.inc.php.

& ArticleGalleyDAO::getGalley (   $galleyId,
  $articleId = null 
)

Retrieve a galley by ID.

Parameters
$galleyIdint
$articleIdint optional
Returns
ArticleGalley

Definition at line 38 of file ArticleGalleyDAO.inc.php.

References _returnGalleyFromRow(), HookRegistry\call(), and DAO\retrieve().

Referenced by getGalleyByBestGalleyId().

& ArticleGalleyDAO::getGalleyByBestGalleyId (   $galleyId,
  $articleId 
)

Retrieve article galley by public galley id or, failing that, internal galley ID; public galley ID takes precedence.

Parameters
$galleyIdstring
$articleIdint
Returns
galley object

Definition at line 219 of file ArticleGalleyDAO.inc.php.

References getGalley(), and getGalleyByPubId().

& ArticleGalleyDAO::getGalleyByPubId (   $pubIdType,
  $pubId,
  $articleId = null 
)

Retrieve a galley by 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
$articleIdint
Returns
ArticleGalley

Definition at line 103 of file ArticleGalleyDAO.inc.php.

References getGalleysBySetting().

Referenced by getGalleyByBestGalleyId().

& ArticleGalleyDAO::getGalleyImages (   $galleyId)

Retrieve array of the images for an HTML galley.

Parameters
$galleyIdint
Returns
array ArticleFile

Definition at line 498 of file ArticleGalleyDAO.inc.php.

References DAO\retrieve().

Referenced by _returnGalleyFromRow().

& ArticleGalleyDAO::getGalleysByArticle (   $articleId)

Retrieve all galleys for an article.

Parameters
$articleIdint
Returns
array ArticleGalleys

Definition at line 166 of file ArticleGalleyDAO.inc.php.

References _returnGalleyFromRow(), HookRegistry\call(), and DAO\retrieve().

Referenced by deleteGalleysByArticle().

& ArticleGalleyDAO::getGalleysByJournalId (   $journalId)

Retrieve all galleys of a journal.

Parameters
$journalIdint
Returns
DAOResultFactory

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

References DAO\retrieve().

Referenced by deleteAllPubIds().

& ArticleGalleyDAO::getGalleysBySetting (   $settingName,
  $settingValue,
  $articleId = null,
  $journalId = null 
)

Find galleys by querying galley settings.

Parameters
$settingNamestring
$settingValuemixed
$articleIdint optional
$journalIdint optional
Returns
array The galleys identified by setting.

Definition at line 123 of file ArticleGalleyDAO.inc.php.

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

Referenced by getGalleyByPubId().

ArticleGalleyDAO::getInsertGalleyId ( )

Get the ID of the last inserted gallery.

Returns
int

Definition at line 484 of file ArticleGalleyDAO.inc.php.

References DAO\getInsertId().

Referenced by insertGalley().

ArticleGalleyDAO::getLocaleFieldNames ( )

Get the list of fields for which data is localized.

Returns
array

Definition at line 229 of file ArticleGalleyDAO.inc.php.

ArticleGalleyDAO::getNextGalleySequence (   $articleId)

Get the the next sequence number for an article's galleys (i.e., current max + 1).

Parameters
$articleIdint
Returns
int

Definition at line 467 of file ArticleGalleyDAO.inc.php.

References DAO\retrieve().

Referenced by insertGalley().

ArticleGalleyDAO::incrementViews (   $galleyId)

Increment the views count for a galley.

Parameters
$galleyIdint

Definition at line 430 of file ArticleGalleyDAO.inc.php.

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

ArticleGalleyDAO::insertGalley ( $galley)
ArticleGalleyDAO::insertGalleyImage (   $galleyId,
  $fileId 
)

Attach an image to an HTML galley.

Parameters
$galleyIdint
$fileIdint

Definition at line 523 of file ArticleGalleyDAO.inc.php.

References DAO\update().

ArticleGalleyDAO::pubIdExists (   $pubIdType,
  $pubId,
  $galleyId,
  $journalId 
)

Checks if public identifier exists (other than for the specified galley 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
$galleyIdint An ID to be excluded from the search.
$journalIdint
Returns
boolean

Definition at line 75 of file ArticleGalleyDAO.inc.php.

References DAO\retrieve().

ArticleGalleyDAO::resequenceGalleys (   $articleId)

Sequentially renumber galleys for an article in their sequence order.

Parameters
$articleIdint

Definition at line 443 of file ArticleGalleyDAO.inc.php.

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

ArticleGalleyDAO::updateGalley ( $galley)

Update an existing ArticleGalley.

Parameters
$galleyArticleGalley

Definition at line 334 of file ArticleGalleyDAO.inc.php.

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

ArticleGalleyDAO::updateLocaleFields ( $galley)

Update the localized fields for this galley.

Parameters
$galley

Definition at line 249 of file ArticleGalleyDAO.inc.php.

References DAO\updateDataObjectSettings().

Referenced by insertGalley(), and updateGalley().

Member Data Documentation

ArticleGalleyDAO::$articleFileDao

Helper file DAOs.

Definition at line 22 of file ArticleGalleyDAO.inc.php.


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