PHP Class ArticleTopic

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

Public Properties

Property Type Description
$m_columnNames
$m_dbTableName
$m_keyColumnNames

Public Methods

Method Description
AddTopicToArticle ( integer $p_topicId, integer $p_articleNumber ) : void Link a topic to an article.
ArticleTopic ( )
GetArticleTopics ( integer $p_articleNumber, boolean $p_countOnly = false ) : mixed Get the topics for the given article.
GetArticlesWithTopic ( integer $p_topicId ) : array Get the Articles that have the given Topic.
GetList ( array $p_parameters, string $p_order = null, integer $p_start, integer $p_limit, integer &$p_count, $p_skipCache = false ) : array Returns an article topics list based on the given parameters.
OnArticleCopy ( integer $p_srcArticleNumber, integer $p_destArticleNumber ) : void Copy the topic pointers
OnArticleDelete ( integer $p_articleNumber ) : void Remove topic pointers for the given article.
RemoveTopicFromArticle ( integer $p_topicId, integer $p_articleNumber ) : void Unlink a topic from an article.
RemoveTopicFromArticles ( integer $p_topicId ) : void Unlink a topic from all articles.
getArticleNumber ( ) : integer
getTopicId ( ) : integer

Private Methods

Method Description
ProcessListParameters ( array $p_param ) : array Processes a paremeter (condition) coming from template tags.
buildSubtopicsArray ( $p_parentIds ) : array Retrieves the subtopics of the given parent.

Method Details

AddTopicToArticle() public static method

Link a topic to an article.
public static AddTopicToArticle ( integer $p_topicId, integer $p_articleNumber ) : void
$p_topicId integer
$p_articleNumber integer
return void

ArticleTopic() public method

public ArticleTopic ( )

GetArticleTopics() public static method

Get the topics for the given article.
public static GetArticleTopics ( integer $p_articleNumber, boolean $p_countOnly = false ) : mixed
$p_articleNumber integer Retrieve the topics for this article.
$p_countOnly boolean Only get the number of topics attached to the article.
return mixed Return an array or an int.

GetArticlesWithTopic() public static method

Get the Articles that have the given Topic.
public static GetArticlesWithTopic ( integer $p_topicId ) : array
$p_topicId integer
return array

GetList() public static method

Returns an article topics list based on the given parameters.
public static GetList ( array $p_parameters, string $p_order = null, integer $p_start, integer $p_limit, integer &$p_count, $p_skipCache = false ) : array
$p_parameters array An array of ComparisonOperation objects
$p_order string An array of columns and directions to order by
$p_start integer The record number to start the list
$p_limit integer The offset. How many records from $p_start will be retrieved.
$p_count integer The total count of the elements; this count is computed without applying the start ($p_start) and limit parameters ($p_limit)
return array $articleTopicsList An array of Topic objects

OnArticleCopy() public static method

Copy the topic pointers
public static OnArticleCopy ( integer $p_srcArticleNumber, integer $p_destArticleNumber ) : void
$p_srcArticleNumber integer
$p_destArticleNumber integer
return void

OnArticleDelete() public static method

Remove topic pointers for the given article.
public static OnArticleDelete ( integer $p_articleNumber ) : void
$p_articleNumber integer
return void

RemoveTopicFromArticle() public static method

Unlink a topic from an article.
public static RemoveTopicFromArticle ( integer $p_topicId, integer $p_articleNumber ) : void
$p_topicId integer
$p_articleNumber integer
return void

RemoveTopicFromArticles() public static method

Unlink a topic from all articles.
public static RemoveTopicFromArticles ( integer $p_topicId ) : void
$p_topicId integer
return void

getArticleNumber() public method

public getArticleNumber ( ) : integer
return integer

getTopicId() public method

public getTopicId ( ) : integer
return integer

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