rex_article_slice
in package
The rex_article_slice class is an object wrapper over the database table rex_article_slice.
Together with rex_article and rex_category it provides an object oriented Framework for accessing vital parts of your website. This framework can be used in Modules, Templates and PHP-Slices!
Table of Contents
Constants
- ORDER_ASC = 'ASC'
- ORDER_DESC = 'DESC'
Methods
- getArticle() : rex_article
- getArticleId() : int
- getArticleSliceById() : self|null
- Return an ArticleSlice by its id.
- getClang() : int
- getClangId() : int
- getCtype() : int
- getFirstSliceForArticle() : self|null
- Return the first slice for an article.
- getFirstSliceForCtype() : self|null
- Returns the first slice of the given ctype of an article.
- getId() : int
- getLink() : int|null
- getLinkList() : string|null
- getLinkListArray() : array<int, int>|null
- getLinkUrl() : string|null
- getMedia() : string|null
- getMediaList() : string|null
- getMediaListArray() : array<int, string>|null
- getMediaUrl() : string|null
- getModuleId() : int
- getNextSlice() : self|null
- Return the next slice for this article.
- getPreviousSlice() : self|null
- getPriority() : int
- getRevision() : int
- getSlice() : string
- Gibt den Slice formatiert zurück.
- getSlicesForArticle() : array<int, self>
- Return all slices for an article that have a certain clang or revision.
- getSlicesForArticleOfType() : array<int, self>
- Return all slices for an article that have a certain module type.
- getValue() : int|string|null
- getValueArray() : array<string|int, mixed>|null
- isOnline() : bool
- __construct() : mixed
- getSlicesWhere() : array<int, self>
- getSliceWhere() : self|null
Constants
ORDER_ASC
protected
mixed
ORDER_ASC
= 'ASC'
ORDER_DESC
protected
mixed
ORDER_DESC
= 'DESC'
Methods
getArticle()
public
getArticle() : rex_article
Return values
rex_articlegetArticleId()
public
getArticleId() : int
Return values
intgetArticleSliceById()
Return an ArticleSlice by its id.
public
static getArticleSliceById(int $anId[, false|int $clang = false ][, int $revision = 0 ]) : self|null
Parameters
- $anId : int
- $clang : false|int = false
- $revision : int = 0
Return values
self|nullgetClang()
public
getClang() : int
Tags
Return values
intgetClangId()
public
getClangId() : int
Return values
intgetCtype()
public
getCtype() : int
Return values
intgetFirstSliceForArticle()
Return the first slice for an article.
public
static getFirstSliceForArticle(int $anArticleId[, false|int $clang = false ][, int $revision = 0 ][, bool $ignoreOfflines = false ]) : self|null
This can then be used to iterate over all the slices in the order as they appear using the getNextSlice() function.
Parameters
- $anArticleId : int
- $clang : false|int = false
- $revision : int = 0
- $ignoreOfflines : bool = false
Return values
self|nullgetFirstSliceForCtype()
Returns the first slice of the given ctype of an article.
public
static getFirstSliceForCtype(int $ctype, int $anArticleId[, false|int $clang = false ][, int $revision = 0 ][, bool $ignoreOfflines = false ]) : self|null
Parameters
- $ctype : int
- $anArticleId : int
- $clang : false|int = false
- $revision : int = 0
- $ignoreOfflines : bool = false
Return values
self|nullgetId()
public
getId() : int
Return values
intgetLink()
public
getLink(int $index) : int|null
Parameters
- $index : int
Return values
int|nullgetLinkList()
public
getLinkList(int $index) : string|null
Parameters
- $index : int
Return values
string|null —liefert kommaseparierten String
getLinkListArray()
public
getLinkListArray(int $index) : array<int, int>|null
Parameters
- $index : int
Return values
array<int, int>|nullgetLinkUrl()
public
getLinkUrl(int $index) : string|null
Parameters
- $index : int
Return values
string|nullgetMedia()
public
getMedia(int $index) : string|null
Parameters
- $index : int
Return values
string|nullgetMediaList()
public
getMediaList(int $index) : string|null
Parameters
- $index : int
Return values
string|null —liefert kommaseparierten String
getMediaListArray()
public
getMediaListArray(int $index) : array<int, string>|null
Parameters
- $index : int
Return values
array<int, string>|nullgetMediaUrl()
public
getMediaUrl(int $index) : string|null
Parameters
- $index : int
Return values
string|nullgetModuleId()
public
getModuleId() : int
Return values
intgetNextSlice()
Return the next slice for this article.
public
getNextSlice([bool $ignoreOfflines = false ]) : self|null
Parameters
- $ignoreOfflines : bool = false
Return values
self|nullgetPreviousSlice()
public
getPreviousSlice([bool $ignoreOfflines = false ]) : self|null
Parameters
- $ignoreOfflines : bool = false
Return values
self|nullgetPriority()
public
getPriority() : int
Return values
intgetRevision()
public
getRevision() : int
Return values
intgetSlice()
Gibt den Slice formatiert zurück.
public
getSlice() : string
Tags
Return values
stringgetSlicesForArticle()
Return all slices for an article that have a certain clang or revision.
public
static getSlicesForArticle(int $anArticleId[, false|int $clang = false ][, int $revision = 0 ][, bool $ignoreOfflines = false ]) : array<int, self>
Parameters
- $anArticleId : int
- $clang : false|int = false
- $revision : int = 0
- $ignoreOfflines : bool = false
Return values
array<int, self>getSlicesForArticleOfType()
Return all slices for an article that have a certain module type.
public
static getSlicesForArticleOfType(int $anArticleId, int $aModuletypeId[, false|int $clang = false ][, int $revision = 0 ][, bool $ignoreOfflines = false ]) : array<int, self>
Parameters
- $anArticleId : int
- $aModuletypeId : int
- $clang : false|int = false
- $revision : int = 0
- $ignoreOfflines : bool = false
Return values
array<int, self>getValue()
public
getValue(T $index) : int|string|null
Parameters
- $index : T
Tags
Return values
int|string|nullgetValueArray()
public
getValueArray(int $index) : array<string|int, mixed>|null
Parameters
- $index : int
Return values
array<string|int, mixed>|nullisOnline()
public
isOnline() : bool
Return values
bool__construct()
protected
__construct(int $id, int $articleId, int $clang, int $ctype, int $moduleId, int $priority, int $status, int $createdate, int $updatedate, string $createuser, string $updateuser, int $revision, array<int, string|null> $values, array<int, string|null> $media, array<int, string|null> $medialists, array<int, string|null> $links, array<int, string|null> $linklists) : mixed
Parameters
- $id : int
- $articleId : int
- $clang : int
- $ctype : int
- $moduleId : int
- $priority : int
- $status : int
- $createdate : int
- $updatedate : int
- $createuser : string
- $updateuser : string
- $revision : int
- $values : array<int, string|null>
- $media : array<int, string|null>
- $medialists : array<int, string|null>
- $links : array<int, string|null>
- $linklists : array<int, string|null>
getSlicesWhere()
protected
static getSlicesWhere(literal-string $where[, array<string|int, mixed> $params = [] ][, self::ORDER_* $orderDirection = 'ASC' ][, int|null $limit = null ]) : array<int, self>
Parameters
- $where : literal-string
- $params : array<string|int, mixed> = []
- $orderDirection : self::ORDER_* = 'ASC'
- $limit : int|null = null
Return values
array<int, self>getSliceWhere()
protected
static getSliceWhere(literal-string $where[, array<string|int, mixed> $params = [] ][, self::ORDER_* $orderDirection = self::ORDER_ASC ]) : self|null
Parameters
- $where : literal-string
- $params : array<string|int, mixed> = []
- $orderDirection : self::ORDER_* = self::ORDER_ASC