PHP Class ArticleAttachment

Inheritance: extends DbRecord
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
AddFileToArticle ( integer $p_attachmentId, integer $p_articleNumber ) : void Link the given file with the given article.
ArticleAttachment ( integer $p_articleNumber = null, integer $p_attachmentId = null ) : ArticleAttachment The article attachment table links together articles with Attachments.
GetAttachmentsByArticleNumber ( integer $p_articleNumber, integer $p_languageId = null ) : array Get all the attachments that belong to this article.
GetList ( array $p_parameters, string $p_order = null, integer $p_start, integer $p_limit, integer &$p_count, $p_skipCache = false ) : array Returns an article attachments list based on the given parameters.
OnArticleCopy ( integer $p_srcArticleNumber, integer $p_destArticleNumber ) : void Copy all the pointers for the given article.
OnArticleDelete ( integer $p_articleNumber ) : void Remove attachment pointers for the given article.
OnAttachmentDelete ( integer $p_attachmentId ) : void This is called when an attachment is deleted.
RemoveAttachmentFromArticle ( integer $p_attachmentId, integer $p_articleNumber ) : void Remove the linkage between the given attachment and the given article.
getArticleNumber ( ) : integer
getAttachmentId ( ) : integer

Private Methods

Méthode Description
ProcessParameters ( array $p_param ) : array Processes a parameter (condition) coming from template tags.

Method Details

AddFileToArticle() public static méthode

Link the given file with the given article.
public static AddFileToArticle ( integer $p_attachmentId, integer $p_articleNumber ) : void
$p_attachmentId integer
$p_articleNumber integer
Résultat void

ArticleAttachment() public méthode

The article attachment table links together articles with Attachments.
public ArticleAttachment ( integer $p_articleNumber = null, integer $p_attachmentId = null ) : ArticleAttachment
$p_articleNumber integer
$p_attachmentId integer
Résultat ArticleAttachment

GetAttachmentsByArticleNumber() public static méthode

Get all the attachments that belong to this article.
public static GetAttachmentsByArticleNumber ( integer $p_articleNumber, integer $p_languageId = null ) : array
$p_articleNumber integer
$p_languageId integer
Résultat array

GetList() public static méthode

Returns an article attachments 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 $articleAttachmentsList An array of Attachment objects

OnArticleCopy() public static méthode

Copy all the pointers for the given article.
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 attachment pointers for the given article.
public static OnArticleDelete ( integer $p_articleNumber ) : void
$p_articleNumber integer
Résultat void

OnAttachmentDelete() public static méthode

It will disassociate the file from all articles.
public static OnAttachmentDelete ( integer $p_attachmentId ) : void
$p_attachmentId integer
Résultat void

RemoveAttachmentFromArticle() public static méthode

Remove the linkage between the given attachment and the given article.
public static RemoveAttachmentFromArticle ( integer $p_attachmentId, integer $p_articleNumber ) : void
$p_attachmentId integer
$p_articleNumber integer
Résultat void

getArticleNumber() public méthode

public getArticleNumber ( ) : integer
Résultat integer

getAttachmentId() public méthode

public getAttachmentId ( ) : 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