PHP Class ArticleDAO, ojs

Exibir arquivo Open project: pkp/ojs Class Usage Examples

Public Methods

Method Description
__construct ( ) Constructor.
_fromRow ( $row ) : Article Internal function to return an Article object from a row.
changeStatus ( $articleId, $status ) Change the status of the article
deleteById ( $submissionId )
flushCache ( )
getBySetting ( $settingName, $settingValue, $journalId = null, $rangeInfo = null ) : array Find articles by querying article settings.
getJournalId ( $articleId ) : integer Get the ID of the journal an article is in.
getLocaleFieldNames ( ) : array Get a list of fields for which localized data is supported
insertObject ( $article ) Insert a new Article.
newDataObject ( ) : Article Return a new data object.
removeArticlesFromSection ( $sectionId ) Removes articles from a section by section ID
updateObject ( $article ) Update an existing article.
updateSetting ( $articleId, $name, $value, $type, $isLocalized = false ) Add/update an article setting.

Protected Methods

Method Description
getCompletionConditions ( $completed )
getCompletionJoins ( )
getFetchColumns ( )
getFetchJoins ( )
getFetchParameters ( )
getGroupByColumns ( )
getSubEditorJoin ( )

Method Details

__construct() public method

Constructor.
public __construct ( )

_fromRow() public method

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

changeStatus() public method

Change the status of the article
public changeStatus ( $articleId, $status )
$articleId int
$status int

deleteById() public method

public deleteById ( $submissionId )

flushCache() public method

public flushCache ( )

getBySetting() public method

Find articles by querying article settings.
public getBySetting ( $settingName, $settingValue, $journalId = null, $rangeInfo = null ) : array
$settingName string
$settingValue mixed
$journalId int optional
$rangeInfo DBResultRange optional
return array The articles identified by setting. WARNING: This query is selectively indexed for PostgreSQL. Ensure that the settings you wish to query are specified in dbscripts/xml/indexes.xml to avoid a potentially costly query.

getCompletionConditions() protected method

protected getCompletionConditions ( $completed )

getCompletionJoins() protected method

protected getCompletionJoins ( )

getFetchColumns() protected method

protected getFetchColumns ( )

getFetchJoins() protected method

protected getFetchJoins ( )

getFetchParameters() protected method

protected getFetchParameters ( )

getGroupByColumns() protected method

protected getGroupByColumns ( )

getJournalId() public method

Get the ID of the journal an article is in.
public getJournalId ( $articleId ) : integer
$articleId int
return integer

getLocaleFieldNames() public method

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

getSubEditorJoin() protected method

protected getSubEditorJoin ( )

insertObject() public method

Insert a new Article.
public insertObject ( $article )
$article Article

newDataObject() public method

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

removeArticlesFromSection() public method

Removes articles from a section by section ID
public removeArticlesFromSection ( $sectionId )
$sectionId int

updateObject() public method

Update an existing article.
public updateObject ( $article )
$article Article

updateSetting() public method

Add/update an article setting.
public updateSetting ( $articleId, $name, $value, $type, $isLocalized = false )
$articleId int
$name string
$value mixed
$type string Data type of the setting.
$isLocalized boolean