PHP 클래스 ArticleImage

Copyright (C) 2005-2012 Leo Feyer
저자: Tim Gatzky ([email protected])
상속: extends Frontend
파일 보기 프로젝트 열기: sourcefabric/newscoop 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$m_columnNames
$m_dbTableName
$m_image
$m_keyColumnNames

공개 메소드들

메소드 설명
AddImageToArticle ( integer $p_imageId, integer $p_articleNumber, integer $p_templateId = null ) : void Link the given image with the given article. The template ID is the image's position in the template.
ArticleImage ( integer $p_articleNumber = null, integer $p_imageId = null, integer $p_templateId = null ) : ArticleImage The ArticleImage table links together Articles with Images.
GetArticlesThatUseImage ( $p_imageId ) : array Return an array of Article objects, all the articles which use this image.
GetImagesByArticleNumber ( integer $p_articleNumber, boolean $p_countOnly = false ) : mixed Get all the images that belong to this article.
GetList ( array $p_parameters, array $p_order = [], integer $p_start, integer $p_limit, integer &$p_count, $p_skipCache = false ) : array Returns an article images list based on the given parameters.
GetUnusedTemplateId ( integer $p_articleNumber ) Get a free Template ID.
OnArticleCopy ( integer $p_srcArticleNumber, integer $p_destArticleNumber ) : void Copy all the pointers for the given article.
OnArticleDelete ( integer $p_articleNumber ) : void Remove image pointers for the given article.
OnImageDelete ( integer $p_imageId ) : void This is called when an image is deleted.
RemoveImageTagsFromArticleText ( integer $p_articleNumber, integer $p_templateId ) : void Remove the image tags in the article text.
TemplateIdInUse ( integer $p_articleNumber, integer $p_templateId ) : boolean Return true if article already is using the given template ID, false otherwise.
delete ( ) : boolean Remove the linkage between the given image and the given article and remove the image tags from the article text.
getArticleNumber ( ) : integer
getImage ( ) Return an Image object.
getImageArticleIndex ( ) : integer
getImageId ( ) : integer
getTemplateId ( ) : integer
setProperty ( $p_dbColumnName, $p_value, $p_commit = true, $p_isSql = false ) Wrapper around DatabaseObject::setProperty
setTemplateId ( integer $p_templateId ) : boolean This call will only work for entries that already exist.

비공개 메소드들

메소드 설명
ProcessListOrder ( array $p_order ) : array Processes an order directive coming from template tags.
ProcessListParameters ( array $p_param ) : array Processes a paremeter (condition) coming from template tags.

메소드 상세

AddImageToArticle() 공개 정적인 메소드

Link the given image with the given article. The template ID is the image's position in the template.
public static AddImageToArticle ( integer $p_imageId, integer $p_articleNumber, integer $p_templateId = null ) : void
$p_imageId integer
$p_articleNumber integer
$p_templateId integer Optional. If not specified, this will be the next highest number of the existing values.
리턴 void

ArticleImage() 공개 메소드

The ArticleImage table links together Articles with Images.
public ArticleImage ( integer $p_articleNumber = null, integer $p_imageId = null, integer $p_templateId = null ) : ArticleImage
$p_articleNumber integer
$p_imageId integer
$p_templateId integer
리턴 ArticleImage

GetArticlesThatUseImage() 공개 정적인 메소드

Return an array of Article objects, all the articles which use this image.
public static GetArticlesThatUseImage ( $p_imageId ) : array
리턴 array

GetImagesByArticleNumber() 공개 정적인 메소드

Get all the images that belong to this article.
public static GetImagesByArticleNumber ( integer $p_articleNumber, boolean $p_countOnly = false ) : mixed
$p_articleNumber integer The specific article you want the images from.
$p_countOnly boolean Only return the number of images in the article.
리턴 mixed Return either an array or an int.

GetList() 공개 정적인 메소드

Returns an article images list based on the given parameters.
public static GetList ( array $p_parameters, array $p_order = [], integer $p_start, integer $p_limit, integer &$p_count, $p_skipCache = false ) : array
$p_parameters array An array of ComparisonOperation objects
$p_order array 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)
리턴 array $articleImagesList An array of Image objects

GetUnusedTemplateId() 공개 정적인 메소드

Get a free Template ID.
public static GetUnusedTemplateId ( integer $p_articleNumber )
$p_articleNumber integer

OnArticleCopy() 공개 정적인 메소드

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

OnArticleDelete() 공개 정적인 메소드

Remove image pointers for the given article.
public static OnArticleDelete ( integer $p_articleNumber ) : void
$p_articleNumber integer
리턴 void

OnImageDelete() 공개 정적인 메소드

It will disassociate the image from all articles.
public static OnImageDelete ( integer $p_imageId ) : void
$p_imageId integer
리턴 void

RemoveImageTagsFromArticleText() 공개 정적인 메소드

Remove the image tags in the article text.
public static RemoveImageTagsFromArticleText ( integer $p_articleNumber, integer $p_templateId ) : void
$p_articleNumber integer
$p_templateId integer
리턴 void

TemplateIdInUse() 공개 정적인 메소드

Return true if article already is using the given template ID, false otherwise.
public static TemplateIdInUse ( integer $p_articleNumber, integer $p_templateId ) : boolean
$p_articleNumber integer
$p_templateId integer
리턴 boolean

delete() 공개 메소드

Remove the linkage between the given image and the given article and remove the image tags from the article text.
public delete ( ) : boolean
리턴 boolean

getArticleNumber() 공개 메소드

public getArticleNumber ( ) : integer
리턴 integer

getImage() 공개 메소드

Return an Image object.
public getImage ( )

getImageArticleIndex() 공개 메소드

public getImageArticleIndex ( ) : integer
리턴 integer

getImageId() 공개 메소드

public getImageId ( ) : integer
리턴 integer

getTemplateId() 공개 메소드

public getTemplateId ( ) : integer
리턴 integer

setProperty() 공개 메소드

Wrapper around DatabaseObject::setProperty
public setProperty ( $p_dbColumnName, $p_value, $p_commit = true, $p_isSql = false )

setTemplateId() 공개 메소드

This call will only work for entries that already exist.
public setTemplateId ( integer $p_templateId ) : boolean
$p_templateId integer
리턴 boolean

프로퍼티 상세

$m_columnNames 공개적으로 프로퍼티

public $m_columnNames

$m_dbTableName 공개적으로 프로퍼티

public $m_dbTableName

$m_image 공개적으로 프로퍼티

public $m_image

$m_keyColumnNames 공개적으로 프로퍼티

public $m_keyColumnNames