PHP Class ArticleData

Inheritance: extends DatabaseObject
Show file Open project: sourcefabric/newscoop Class Usage Examples

Public Properties

Property Type Description
$m_articleTypeName
$m_columnNames
$m_dbTableName
$m_keyColumnNames

Public Methods

Method Description
ArticleData ( string $p_articleType, integer $p_articleNumber, integer $p_languageId ) An article type is a dynamic table that is created for an article to allow different publications to display their content in different ways.
TransformInternalLinks ( $p_match ) : string This function is a callback for preg_replace_callback().
TransformSubheads ( $match ) fn copyToExistingRecord
copy ( integer $p_destArticleNumber ) : void Copy the row in the database.
copyToExistingRecord ( integer $p_destArticleNumber, integer $p_destLanguageId = null ) : void Copy the row in the database.
getDisplayName ( $p_lang ) : string Gets the translation for a given language; default language is the session language. If no translation is set for that language, we return the dbTableName.
getFieldValue ( $p_property, $p_forceFetchFromDatabase = false ) constructor
getUserDefinedColumns ( $p_showAll = false, $p_skipCache = false ) : array Return an array of ArticleTypeField objects.
setProperty ( $p_dbColumnName, $p_value, $p_commit = true, $p_isSql = false ) fn getDisplayName
transformImageTags ( $p_match ) : string This function is a callback for preg_replace_callback().

Method Details

ArticleData() public method

An article type is a dynamic table that is created for an article to allow different publications to display their content in different ways.
public ArticleData ( string $p_articleType, integer $p_articleNumber, integer $p_languageId )
$p_articleType string
$p_articleNumber integer
$p_languageId integer

TransformSubheads() public static method

fn copyToExistingRecord
public static TransformSubheads ( $match )

copy() public method

Copy the row in the database.
public copy ( integer $p_destArticleNumber ) : void
$p_destArticleNumber integer
return void

copyToExistingRecord() public method

Copy the row in the database.
public copyToExistingRecord ( integer $p_destArticleNumber, integer $p_destLanguageId = null ) : void
$p_destArticleNumber integer
$p_destLanguageId integer
return void

getDisplayName() public method

Gets the translation for a given language; default language is the session language. If no translation is set for that language, we return the dbTableName.
public getDisplayName ( $p_lang ) : string
return string

getFieldValue() public method

constructor
public getFieldValue ( $p_property, $p_forceFetchFromDatabase = false )

getUserDefinedColumns() public method

Return an array of ArticleTypeField objects.
public getUserDefinedColumns ( $p_showAll = false, $p_skipCache = false ) : array
return array

setProperty() public method

fn getDisplayName
public setProperty ( $p_dbColumnName, $p_value, $p_commit = true, $p_isSql = false )

transformImageTags() public method

It will replace alternate text with
public transformImageTags ( $p_match ) : string
return string

Property Details

$m_articleTypeName public property

public $m_articleTypeName

$m_columnNames public property

public $m_columnNames

$m_dbTableName public property

public $m_dbTableName

$m_keyColumnNames public property

public $m_keyColumnNames