PHP Class ArticleTopic

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

Méthodes publiques

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

Méthodes publiques

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

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

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

ArticleTopic() public méthode

public ArticleTopic ( )

GetArticleTopics() public static méthode

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.
Résultat mixed Return an array or an int.

GetArticlesWithTopic() public static méthode

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

GetList() public static méthode

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)
Résultat array $articleTopicsList An array of Topic objects

OnArticleCopy() public static méthode

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

OnArticleDelete() public static méthode

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

RemoveTopicFromArticle() public static méthode

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

RemoveTopicFromArticles() public static méthode

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

getArticleNumber() public méthode

public getArticleNumber ( ) : integer
Résultat integer

getTopicId() public méthode

public getTopicId ( ) : integer
Résultat 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