PHP Class Publication

Afficher le fichier Open project: sourcefabric/newscoop Class Usage Examples

Méthodes publiques

Свойство Type Description
$m_columnNames
$m_dbTableName
$m_keyColumnNames
$m_keyIsAutoIncrement

Méthodes publiques

Méthode 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

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

Method Details

GetNumPublications() public static méthode

Return the total number of publications.
public static GetNumPublications ( ) : integer
Résultat integer

GetPublications() public static méthode

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
Résultat array

Publication() public méthode

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

commentsArticleDefaultEnabled() public méthode

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

commentsEnabled() public méthode

Alias for getCommentsEnabled
public commentsEnabled ( ) : boolean
Résultat boolean

commentsPublicModerated() public méthode

Get whether comments made by the public are moderated.
public commentsPublicModerated ( ) : boolean
Résultat boolean

commentsSubscribersModerated() public méthode

Return TRUE if comments made by subscribers are moderated.

create() public méthode

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
Résultat boolean

delete() public méthode

Delete the publication and all of its aliases.
public delete ( ) : boolean
Résultat boolean

getCommentsEnabled() public méthode

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

getCommentsModeratorFrom() public méthode

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

getCommentsModeratorTo() public méthode

Get moderator email address for this publication.
public getCommentsModeratorTo ( ) : string
Résultat string

getCurrency() public méthode

public getCurrency ( ) : string
Résultat string

getDefaultAliasId() public méthode

public getDefaultAliasId ( ) : integer
Résultat integer

getDefaultLanguageId() public méthode

Get the default language for this publication.
public getDefaultLanguageId ( ) : integer
Résultat integer

getForumId() public méthode

Return the forum associated with this publication.
public getForumId ( ) : integer
Résultat integer

getLanguageId() public méthode

Get the default language for this publication.
public getLanguageId ( ) : integer
Résultat integer

getLanguages() public méthode

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
Résultat array

getName() public méthode

Get the name of this publication.
public getName ( ) : string
Résultat string

getPaidTime() public méthode

public getPaidTime ( ) : integer
Résultat integer

getPublicComments() public méthode

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

getPublicationId() public méthode

Get the unique ID for this publication.
public getPublicationId ( ) : integer
Résultat integer

getSeo() public méthode

Return the SEO params.
public getSeo ( ) : integer
Résultat integer

getTimeUnit() public méthode

public getTimeUnit ( ) : string
Résultat string

getTimeUnitName() public méthode

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

getTrialTime() public méthode

public getTrialTime ( ) : integer
Résultat integer

getUnitCost() public méthode

public getUnitCost ( ) : float
Résultat float

getUnitCostAllLang() public méthode

public getUnitCostAllLang ( ) : float
Résultat float

getUrlTypeId() public méthode

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

isCaptchaEnabled() public méthode

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

isSpamBlockingEnabled() public méthode

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

publicComments() public méthode

Alias for getPublicComments
public publicComments ( ) : boolean
Résultat boolean

setCaptchaEnabled() public méthode

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
Résultat boolean

setCommentsArticleDefaultEnabled() public méthode

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

setCommentsEnabled() public méthode

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

setCommentsModeratorFrom() public méthode

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

setCommentsModeratorTo() public méthode

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

setCommentsPublicModerated() public méthode

Set whether public comments are moderated.
public setCommentsPublicModerated ( boolean $p_value ) : boolean
$p_value boolean
Résultat boolean

setCommentsSubscribersModerated() public méthode

Set whether subscriber comments are moderated.
public setCommentsSubscribersModerated ( boolean $p_value ) : boolean
$p_value boolean
Résultat boolean

setForumId() public méthode

fn getSeo
public setForumId ( $p_value )

setPublicComments() public méthode

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

setSpamBlockingEnabled() public méthode

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

update() public méthode

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
Résultat 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