PHP Class ArticleGalleyDAO, ojs

Inheritance: extends DAO
Show file Open project: pkp/ojs Class Usage Examples

Public Methods

Method Description
__construct ( ) Constructor.
_fromRow ( $row ) : ArticleGalley Internal function to return an ArticleGalley object from a row.
changePubId ( $galleyId, $pubIdType, $pubId )
deleteAllPubIds ( $journalId, $pubIdType )
deleteByArticleId ( $articleId ) Delete galleys (and dependent galley image entries) by article.
deleteById ( $galleyId, $articleId = null ) Delete a galley by ID.
deleteObject ( $galley ) Delete an ArticleGalley.
deletePubId ( $galleyId, $pubIdType )
getAdditionalFieldNames ( ) : array Get a list of additional fields that do not have dedicated accessors.
getByBestGalleyId ( $galleyId, $articleId ) : ArticleGalley Retrieve article galley by public galley id or, failing that, internal galley ID; public galley ID takes precedence.
getByContextId ( $journalId ) : DAOResultFactory Retrieve all galleys of a journal.
getById ( $galleyId, $submissionId = null, $contextId = null )
getBySubmissionId ( $submissionId, $contextId = null )
getExportable ( $contextId, $pubIdType = null, $title = null, $author = null, $issueId = null, $pubIdSettingName = null, $pubIdSettingValue = null, $rangeInfo = null ) : DAOResultFactory Get all published article galleys (eventually with a pubId assigned and) matching the specified settings.
getGalleyByPubId ( $pubIdType, $pubId, $articleId = null ) : ArticleGalley Retrieve a galley by ID.
getGalleysBySetting ( $settingName, $settingValue, $articleId = null, $journalId = null ) : DAOResultFactory Find galleys by querying galley settings.
getInsertId ( ) : integer Get the ID of the last inserted gallery.
getLocaleFieldNames ( ) : array Get the list of fields for which data is localized.
getNextGalleySequence ( $articleId ) : integer Get the the next sequence number for an article's galleys (i.e., current max + 1).
insertObject ( $galley ) Insert a new ArticleGalley.
newDataObject ( ) : ArticleGalley Return a new data object.
pubIdExists ( $pubIdType, $pubId, $galleyId, $journalId )
resequenceGalleys ( $articleId ) Sequentially renumber galleys for an article in their sequence order.
updateLocaleFields ( $galley ) Update the localized fields for this galley.
updateObject ( $galley ) Update an existing ArticleGalley.

Method Details

__construct() public method

Constructor.
public __construct ( )

_fromRow() public method

Internal function to return an ArticleGalley object from a row.
public _fromRow ( $row ) : ArticleGalley
$row array
return ArticleGalley

changePubId() public method

public changePubId ( $galleyId, $pubIdType, $pubId )

deleteAllPubIds() public method

public deleteAllPubIds ( $journalId, $pubIdType )

deleteByArticleId() public method

NOTE that this will not delete article_file entities or the respective files.
public deleteByArticleId ( $articleId )
$articleId int

deleteById() public method

Delete a galley by ID.
public deleteById ( $galleyId, $articleId = null )
$galleyId int Galley ID.
$articleId int Optional article ID.

deleteObject() public method

Delete an ArticleGalley.
public deleteObject ( $galley )
$galley ArticleGalley

deletePubId() public method

public deletePubId ( $galleyId, $pubIdType )

getAdditionalFieldNames() public method

Get a list of additional fields that do not have dedicated accessors.
public getAdditionalFieldNames ( ) : array
return array

getByBestGalleyId() public method

Retrieve article galley by public galley id or, failing that, internal galley ID; public galley ID takes precedence.
public getByBestGalleyId ( $galleyId, $articleId ) : ArticleGalley
$galleyId string
$articleId int
return ArticleGalley object

getByContextId() public method

Retrieve all galleys of a journal.
public getByContextId ( $journalId ) : DAOResultFactory
$journalId int
return DAOResultFactory

getById() public method

public getById ( $galleyId, $submissionId = null, $contextId = null )

getBySubmissionId() public method

public getBySubmissionId ( $submissionId, $contextId = null )

getExportable() public method

Get all published article galleys (eventually with a pubId assigned and) matching the specified settings.
public getExportable ( $contextId, $pubIdType = null, $title = null, $author = null, $issueId = null, $pubIdSettingName = null, $pubIdSettingValue = null, $rangeInfo = null ) : DAOResultFactory
$contextId integer optional
$pubIdType string
$title string optional
$author string optional
$issueId integer optional
$pubIdSettingName string optional (e.g. medra::status or medra::registeredDoi)
$pubIdSettingValue string optional
$rangeInfo DBResultRange optional
return DAOResultFactory

getGalleyByPubId() public method

Retrieve a galley by ID.
public getGalleyByPubId ( $pubIdType, $pubId, $articleId = null ) : ArticleGalley
$pubIdType string One of the NLM pub-id-type values or 'other::something' if not part of the official NLM list (see ).
$pubId string
$articleId int
return ArticleGalley

getGalleysBySetting() public method

Find galleys by querying galley settings.
public getGalleysBySetting ( $settingName, $settingValue, $articleId = null, $journalId = null ) : DAOResultFactory
$settingName string
$settingValue mixed
$articleId int optional
$journalId int optional
return DAOResultFactory The factory for galleys identified by setting.

getInsertId() public method

Get the ID of the last inserted gallery.
public getInsertId ( ) : integer
return integer

getLocaleFieldNames() public method

Get the list of fields for which data is localized.
public getLocaleFieldNames ( ) : array
return array

getNextGalleySequence() public method

Get the the next sequence number for an article's galleys (i.e., current max + 1).
public getNextGalleySequence ( $articleId ) : integer
$articleId int
return integer

insertObject() public method

Insert a new ArticleGalley.
public insertObject ( $galley )
$galley ArticleGalley

newDataObject() public method

Return a new data object.
public newDataObject ( ) : ArticleGalley
return ArticleGalley

pubIdExists() public method

public pubIdExists ( $pubIdType, $pubId, $galleyId, $journalId )

resequenceGalleys() public method

Sequentially renumber galleys for an article in their sequence order.
public resequenceGalleys ( $articleId )
$articleId int

updateLocaleFields() public method

Update the localized fields for this galley.
public updateLocaleFields ( $galley )
$galley

updateObject() public method

Update an existing ArticleGalley.
public updateObject ( $galley )
$galley ArticleGalley