PHP Class ArticleAttachment

Inheritance: extends DbRecord
Mostrar archivo Open project: sourcefabric/newscoop Class Usage Examples

Public Properties

Property Type Description
$m_columnNames
$m_dbTableName
$m_keyColumnNames

Public Methods

Method 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

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

Method Details

AddFileToArticle() public static method

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

ArticleAttachment() public method

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
return ArticleAttachment

GetAttachmentsByArticleNumber() public static method

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
return array

GetList() public static method

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)
return array $articleAttachmentsList An array of Attachment objects

OnArticleCopy() public static method

Copy all the pointers for the given article.
public static OnArticleCopy ( integer $p_srcArticleNumber, integer $p_destArticleNumber ) : void
$p_srcArticleNumber integer
$p_destArticleNumber integer
return void

OnArticleDelete() public static method

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

OnAttachmentDelete() public static method

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

RemoveAttachmentFromArticle() public static method

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
return void

getArticleNumber() public method

public getArticleNumber ( ) : integer
return integer

getAttachmentId() public method

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