PHP Class ArticlePublish

Inheritance: extends DatabaseObject
显示文件 Open project: sourcefabric/newscoop Class Usage Examples

Public Properties

Property Type Description
$m_columnNames
$m_dbTableName
$m_keyColumnNames
$m_keyIsAutoIncrement

Public Methods

Method Description
ArticleHasFutureActions ( integer $p_articleNumber, integer $p_languageId ) : boolean Return TRUE if there are actions scheduled in the future.
ArticlePublish ( integer $p_id = null ) This table delays an article's publish time to a later date.
DoPendingActions ( ) : void Execute all pending actions.
GetArticleEvents ( integer $p_articleNumber, integer $p_languageId = null, boolean $p_onlyFutureEvents = false ) : array Get all the events that will change the article's state.
GetFutureActions ( integer $p_limit ) : array For now, this is mostly a hack to get the home page working.
GetPendingActions ( ) : array Get all the actions that currently need to be performed.
OnArticleDelete ( integer $p_articleNumber, integer $p_languageId ) : void This will be called whenever an article is deleted.
delete ( ) constructor
doAction ( ) : void Execute the action, and mark the action as completed.
getActionTime ( ) : string Get the time the event is scheduled to happen.
getArticleNumber ( ) : integer Return the article number associated with this action.
getArticlePublishId ( ) : integer Get the unique ID that identifies this action.
getFrontPageAction ( ) : mixed Get the front page state to switch to when the "publish time" arrives.
getLanguageId ( ) : integer Return the language ID of the article.
getPublishAction ( ) : mixed Get the published state to switch to when the "publish time" arrives: NULL for no action, 'P' for Publish, or 'U' for Unpublish.
getSectionPageAction ( ) : mixed Get the section page state to switch to when the "publish time" arrives.
setActionTime ( string $p_value ) : boolean Set the time when the action(s) should be taken.
setArticleNumber ( integer $p_value ) : boolean Set the Article number.
setCompleted ( ) : void Mark that this action has been completed.
setFrontPageAction ( $p_value ) : mixed Set the front page state to switch to when the "publish time" arrives.
setLanguageId ( integer $p_value ) : boolean Set the language ID.
setPublishAction ( $p_value ) : void Set the published state to switch to when the "publish time" arrives: NULL for no action, 'P' for Publish, or 'U' for Unpublish.
setSectionPageAction ( $p_value ) : mixed Set the section page state to switch to when the "publish time" arrives.

Method Details

ArticleHasFutureActions() public static method

Return TRUE if there are actions scheduled in the future.
public static ArticleHasFutureActions ( integer $p_articleNumber, integer $p_languageId ) : boolean
$p_articleNumber integer
$p_languageId integer
return boolean

ArticlePublish() public method

This table delays an article's publish time to a later date.
public ArticlePublish ( integer $p_id = null )
$p_id integer

DoPendingActions() public static method

Execute all pending actions.
public static DoPendingActions ( ) : void
return void

GetArticleEvents() public static method

Returns an array of ArticlePublish objects.
public static GetArticleEvents ( integer $p_articleNumber, integer $p_languageId = null, boolean $p_onlyFutureEvents = false ) : array
$p_articleNumber integer
$p_languageId integer
$p_onlyFutureEvents boolean
return array

GetFutureActions() public static method

The raw array is returned.
public static GetFutureActions ( integer $p_limit ) : array
$p_limit integer
return array

GetPendingActions() public static method

Get all the actions that currently need to be performed.
public static GetPendingActions ( ) : array
return array

OnArticleDelete() public static method

This will be called whenever an article is deleted.
public static OnArticleDelete ( integer $p_articleNumber, integer $p_languageId ) : void
$p_articleNumber integer
$p_languageId integer
return void

delete() public method

constructor
public delete ( )

doAction() public method

Execute the action, and mark the action as completed.
public doAction ( ) : void
return void

getActionTime() public method

Get the time the event is scheduled to happen.
public getActionTime ( ) : string
return string

getArticleNumber() public method

Return the article number associated with this action.
public getArticleNumber ( ) : integer
return integer

getArticlePublishId() public method

Get the unique ID that identifies this action.
public getArticlePublishId ( ) : integer
return integer

getFrontPageAction() public method

This can be NULL for no action, 'S' for Show, or 'R' for Remove.
public getFrontPageAction ( ) : mixed
return mixed

getLanguageId() public method

Return the language ID of the article.
public getLanguageId ( ) : integer
return integer

getPublishAction() public method

Get the published state to switch to when the "publish time" arrives: NULL for no action, 'P' for Publish, or 'U' for Unpublish.
public getPublishAction ( ) : mixed
return mixed

getSectionPageAction() public method

This can be NULL for no action, 'S' for Show, or 'R' for Remove.
public getSectionPageAction ( ) : mixed
return mixed

setActionTime() public method

The parameter given should be in the form "YYYY-MM-DD HH:MM:SS".
public setActionTime ( string $p_value ) : boolean
$p_value string
return boolean

setArticleNumber() public method

Set the Article number.
public setArticleNumber ( integer $p_value ) : boolean
$p_value integer
return boolean

setCompleted() public method

Mark that this action has been completed.
public setCompleted ( ) : void
return void

setFrontPageAction() public method

This can be NULL for no action, 'S' for Show, or 'R' for Remove.
public setFrontPageAction ( $p_value ) : mixed
return mixed

setLanguageId() public method

Set the language ID.
public setLanguageId ( integer $p_value ) : boolean
$p_value integer
return boolean

setPublishAction() public method

Set the published state to switch to when the "publish time" arrives: NULL for no action, 'P' for Publish, or 'U' for Unpublish.
public setPublishAction ( $p_value ) : void
return void

setSectionPageAction() public method

This can be NULL for no action, 'S' for Show, or 'R' for Remove.
public setSectionPageAction ( $p_value ) : mixed
return mixed

Property Details

$m_columnNames public_oe property

public $m_columnNames

$m_dbTableName public_oe property

public $m_dbTableName

$m_keyColumnNames public_oe property

public $m_keyColumnNames

$m_keyIsAutoIncrement public_oe property

public $m_keyIsAutoIncrement