PHP Class Publication

Exibir arquivo Open project: sourcefabric/newscoop Class Usage Examples

Public Properties

Property Type Description
$m_columnNames
$m_dbTableName
$m_keyColumnNames
$m_keyIsAutoIncrement

Public Methods

Method Description
GetNumPublications ( ) : integer Return the total number of publications.
GetPublications ( string $p_name = null, integer $p_aliasId = null, array $p_sqlOptions = null ) : array Return all publications as an array of Publication objects.
Publication ( integer $p_publicationId = null ) A publication represents a magazine or newspaper.
commentsArticleDefaultEnabled ( ) : boolean Return TRUE if comments will default to enabled in the article edit screen.
commentsEnabled ( ) : boolean Alias for getCommentsEnabled
commentsPublicModerated ( ) : boolean Get whether comments made by the public are moderated.
commentsSubscribersModerated ( ) : boolean Return TRUE if comments made by subscribers are moderated.
create ( array $p_values = null ) : boolean Create the publication.
delete ( ) : boolean Delete the publication and all of its aliases.
getCommentsEnabled ( ) : boolean Return TRUE if comments are enabled for this publication.
getCommentsModeratorFrom ( ) : string Get from which address moderator receives the info email.
getCommentsModeratorTo ( ) : string Get moderator email address for this publication.
getCurrency ( ) : string
getDefaultAliasId ( ) : integer
getDefaultLanguageId ( ) : integer Get the default language for this publication.
getForumId ( ) : integer Return the forum associated with this publication.
getLanguageId ( ) : integer Get the default language for this publication.
getLanguages ( integer $p_excludeLanguageId = null, array $p_order = [], $p_published = false ) : array Return all languages used in the publication as an array of Language objects.
getName ( ) : string Get the name of this publication.
getPaidTime ( ) : integer
getPublicComments ( ) : boolean Return true if comments can be posted by unknown readers.
getPublicationId ( ) : integer Get the unique ID for this publication.
getSeo ( ) : integer Return the SEO params.
getTimeUnit ( ) : string
getTimeUnitName ( integer $p_languageId = null ) : string Returns the publication subscription time unit name.
getTrialTime ( ) : integer
getUnitCost ( ) : float
getUnitCostAllLang ( ) : float
getUrlTypeId ( ) : integer Get the URL type for this publication.
isCaptchaEnabled ( ) : boolean Return TRUE if a CAPTCHA is used to block comment spam when a user is posting.
isSpamBlockingEnabled ( ) : boolean Return TRUE if comments are checked if they are SPAM before they are accepted.
publicComments ( ) : boolean Alias for getPublicComments
setCaptchaEnabled ( boolean $p_value ) : boolean Set whether a CAPTCHA should be used to block comment spam when a user is posting.
setCommentsArticleDefaultEnabled ( boolean $p_value ) : boolean Set whether comments will default to enabled in the article edit screen.
setCommentsEnabled ( boolean $p_value ) : boolean Set whether comments are enabled for this publication.
setCommentsModeratorFrom ( string $p_value ) : boolean Set from which address moderator receives the info email.
setCommentsModeratorTo ( string $p_value ) : boolean Set moderator email adddress to which info email is send.
setCommentsPublicModerated ( boolean $p_value ) : boolean Set whether public comments are moderated.
setCommentsSubscribersModerated ( boolean $p_value ) : boolean Set whether subscriber comments are moderated.
setForumId ( $p_value ) fn getSeo
setPublicComments ( $p_value ) : boolean Set a flag that controls whether an unknown user may post comments.
setSpamBlockingEnabled ( boolean $p_value ) : boolean Set whether to check comments for SPAM before posting them.
update ( array $p_columns = null, boolean $p_commit = true, boolean $p_isSql = false ) : boolean Update the specified columns in the publication.

Private Methods

Method Description
ProcessLanguageListOrder ( array $p_order ) : array Processes an order directive for the issue translations list.

Method Details

GetNumPublications() public static method

Return the total number of publications.
public static GetNumPublications ( ) : integer
return integer

GetPublications() public static method

Return all publications as an array of Publication objects.
public static GetPublications ( string $p_name = null, integer $p_aliasId = null, array $p_sqlOptions = null ) : array
$p_name string
$p_aliasId integer
$p_sqlOptions array
return array

Publication() public method

This class is mainly responsible for specifying publication-wide configuration parameters.
public Publication ( integer $p_publicationId = null )
$p_publicationId integer

commentsArticleDefaultEnabled() public method

Return TRUE if comments will default to enabled in the article edit screen.

commentsEnabled() public method

Alias for getCommentsEnabled
public commentsEnabled ( ) : boolean
return boolean

commentsPublicModerated() public method

Get whether comments made by the public are moderated.

commentsSubscribersModerated() public method

Return TRUE if comments made by subscribers are moderated.

create() public method

This is a wrapper around DatabaseObject::create(), but also logs a message and notifies the Parser.
public create ( array $p_values = null ) : boolean
$p_values array
return boolean

delete() public method

Delete the publication and all of its aliases.
public delete ( ) : boolean
return boolean

getCommentsEnabled() public method

Return TRUE if comments are enabled for this publication.
public getCommentsEnabled ( ) : boolean
return boolean

getCommentsModeratorFrom() public method

Get from which address moderator receives the info email.
public getCommentsModeratorFrom ( ) : string
return string

getCommentsModeratorTo() public method

Get moderator email address for this publication.
public getCommentsModeratorTo ( ) : string
return string

getCurrency() public method

public getCurrency ( ) : string
return string

getDefaultAliasId() public method

public getDefaultAliasId ( ) : integer
return integer

getDefaultLanguageId() public method

Get the default language for this publication.
public getDefaultLanguageId ( ) : integer
return integer

getForumId() public method

Return the forum associated with this publication.
public getForumId ( ) : integer
return integer

getLanguageId() public method

Get the default language for this publication.
public getLanguageId ( ) : integer
return integer

getLanguages() public method

Return all languages used in the publication as an array of Language objects.
public getLanguages ( integer $p_excludeLanguageId = null, array $p_order = [], $p_published = false ) : array
$p_excludeLanguageId integer If greater than 0, exclude the language with the given identifier from the list.
$p_order array The array of order directives in the format: array('field'=>field_name, 'dir'=>order_direction) field_name can take one of the following values: bynumber, byname, byenglish_name, bycode order_direction can take one of the following values: asc, desc
return array

getName() public method

Get the name of this publication.
public getName ( ) : string
return string

getPaidTime() public method

public getPaidTime ( ) : integer
return integer

getPublicComments() public method

Return true if comments can be posted by unknown readers.
public getPublicComments ( ) : boolean
return boolean

getPublicationId() public method

Get the unique ID for this publication.
public getPublicationId ( ) : integer
return integer

getSeo() public method

Return the SEO params.
public getSeo ( ) : integer
return integer

getTimeUnit() public method

public getTimeUnit ( ) : string
return string

getTimeUnitName() public method

Returns the publication subscription time unit name.
public getTimeUnitName ( integer $p_languageId = null ) : string
$p_languageId integer
return string

getTrialTime() public method

public getTrialTime ( ) : integer
return integer

getUnitCost() public method

public getUnitCost ( ) : float
return float

getUnitCostAllLang() public method

public getUnitCostAllLang ( ) : float
return float

getUrlTypeId() public method

This returns a key to the URLTypes table, but currently there are only two URL types: "short names" and "template path".
public getUrlTypeId ( ) : integer
return integer

isCaptchaEnabled() public method

Return TRUE if a CAPTCHA is used to block comment spam when a user is posting.
public isCaptchaEnabled ( ) : boolean
return boolean

isSpamBlockingEnabled() public method

Return TRUE if comments are checked if they are SPAM before they are accepted.
public isSpamBlockingEnabled ( ) : boolean
return boolean

publicComments() public method

Alias for getPublicComments
public publicComments ( ) : boolean
return boolean

setCaptchaEnabled() public method

Set whether a CAPTCHA should be used to block comment spam when a user is posting.
public setCaptchaEnabled ( boolean $p_value ) : boolean
$p_value boolean
return boolean

setCommentsArticleDefaultEnabled() public method

Set whether comments will default to enabled in the article edit screen.
public setCommentsArticleDefaultEnabled ( boolean $p_value ) : boolean
$p_value boolean
return boolean

setCommentsEnabled() public method

Set whether comments are enabled for this publication.
public setCommentsEnabled ( boolean $p_value ) : boolean
$p_value boolean
return boolean

setCommentsModeratorFrom() public method

Set from which address moderator receives the info email.
public setCommentsModeratorFrom ( string $p_value ) : boolean
$p_value string
return boolean

setCommentsModeratorTo() public method

Set moderator email adddress to which info email is send.
public setCommentsModeratorTo ( string $p_value ) : boolean
$p_value string
return boolean

setCommentsPublicModerated() public method

Set whether public comments are moderated.
public setCommentsPublicModerated ( boolean $p_value ) : boolean
$p_value boolean
return boolean

setCommentsSubscribersModerated() public method

Set whether subscriber comments are moderated.
public setCommentsSubscribersModerated ( boolean $p_value ) : boolean
$p_value boolean
return boolean

setForumId() public method

fn getSeo
public setForumId ( $p_value )

setPublicComments() public method

Set a flag that controls whether an unknown user may post comments.
public setPublicComments ( $p_value ) : boolean
return boolean

setSpamBlockingEnabled() public method

Set whether to check comments for SPAM before posting them.
public setSpamBlockingEnabled ( boolean $p_value ) : boolean
$p_value boolean
return boolean

update() public method

A wrapper around the DatabaseObject::update(), but this function logs a message after the update is complete and notifies the Parser about the change.
public update ( array $p_columns = null, boolean $p_commit = true, boolean $p_isSql = false ) : boolean
$p_columns array
$p_commit boolean
$p_isSql boolean
return boolean

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