PHP Класс ArticleImage

Copyright (C) 2005-2012 Leo Feyer
Автор: Tim Gatzky ([email protected])
Наследование: extends Frontend
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$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