\rex_article_slice

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!

Summary

Methods
Properties
Constants
getArticleSliceById()
getFirstSliceForArticle()
getFirstSliceForCtype()
getSlicesForArticle()
getSlicesForArticleOfType()
getNextSlice()
getPreviousSlice()
getSlice()
getArticle()
getArticleId()
getClangId()
getClang()
getCtype()
getRevision()
getModuleId()
getId()
getValue()
getLink()
getLinkUrl()
getLinkList()
getMedia()
getMediaUrl()
getMediaList()
getPriority()
isOnline()
No public properties found
ORDER_ASC
ORDER_DESC
__construct()
getSliceWhere()
getSlicesWhere()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Constants

ORDER_DESC

ORDER_DESC = 'DESC'

Methods

getArticleSliceById()

getArticleSliceById(int  $anId, false|int  $clang = false, int  $revision) : self|null

Return an ArticleSlice by its id.

Parameters

int $anId
false|int $clang
int $revision

Returns

self|null —

getFirstSliceForArticle()

getFirstSliceForArticle(int  $anArticleId, false|int  $clang = false, int  $revision, bool  $ignoreOfflines = false) : self|null

Return the first slice for an article.

This can then be used to iterate over all the slices in the order as they appear using the getNextSlice() function.

Parameters

int $anArticleId
false|int $clang
int $revision
bool $ignoreOfflines

Returns

self|null —

getFirstSliceForCtype()

getFirstSliceForCtype(int  $ctype, int  $anArticleId, false|int  $clang = false, int  $revision, bool  $ignoreOfflines = false) : self|null

Returns the first slice of the given ctype of an article.

Parameters

int $ctype
int $anArticleId
false|int $clang
int $revision
bool $ignoreOfflines

Returns

self|null —

getSlicesForArticle()

getSlicesForArticle(int  $anArticleId, false|int  $clang = false, int  $revision, bool  $ignoreOfflines = false) : self[]

Return all slices for an article that have a certain clang or revision.

Parameters

int $anArticleId
false|int $clang
int $revision
bool $ignoreOfflines

Returns

self[] —

getSlicesForArticleOfType()

getSlicesForArticleOfType(int  $anArticleId, int  $aModuletypeId, false|int  $clang = false, int  $revision, bool  $ignoreOfflines = false) : self[]

Return all slices for an article that have a certain module type.

Parameters

int $anArticleId
int $aModuletypeId
false|int $clang
int $revision
bool $ignoreOfflines

Returns

self[] —

getNextSlice()

getNextSlice(bool  $ignoreOfflines = false) : self|null

Return the next slice for this article.

Parameters

bool $ignoreOfflines

Returns

self|null —

getPreviousSlice()

getPreviousSlice(bool  $ignoreOfflines = false) : self|null

Parameters

bool $ignoreOfflines

Returns

self|null —

getSlice()

getSlice() : string

Gibt den Slice formatiert zurück.

Returns

string —

getArticle()

getArticle() : \rex_article

Returns

\rex_article —

getArticleId()

getArticleId() : mixed

Returns

mixed —

getClangId()

getClangId() : mixed

Returns

mixed —

getClang()

getClang() : mixed

Returns

mixed —

getCtype()

getCtype() : mixed

Returns

mixed —

getRevision()

getRevision() : mixed

Returns

mixed —

getModuleId()

getModuleId() : mixed

Returns

mixed —

getId()

getId() : mixed

Returns

mixed —

getValue()

getValue(mixed  $index) : mixed

Parameters

mixed $index

Returns

mixed —

getLink()

getLink(mixed  $index) : mixed

Parameters

mixed $index

Returns

mixed —

getLinkUrl()

getLinkUrl(mixed  $index) : mixed

Parameters

mixed $index

Returns

mixed —

getLinkList()

getLinkList(mixed  $index) : mixed

Parameters

mixed $index

Returns

mixed —

getMedia()

getMedia(mixed  $index) : mixed

Parameters

mixed $index

Returns

mixed —

getMediaUrl()

getMediaUrl(int  $index) : string

Parameters

int $index

Returns

string —

getMediaList()

getMediaList(mixed  $index) : mixed

Parameters

mixed $index

Returns

mixed —

getPriority()

getPriority() : mixed

Returns

mixed —

isOnline()

isOnline() : bool

Returns

bool —

__construct()

__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  $values, array  $media, array  $medialists, array  $links, array  $linklists) : mixed

Constructor.

Parameters

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 $values
array $media
array $medialists
array $links
array $linklists

Returns

mixed —

getSliceWhere()

getSliceWhere(string  $where, array  $params = [], string  $orderDirection = self::ORDER_ASC) : self|null

Parameters

string $where
array $params
string $orderDirection

Returns

self|null —

getSlicesWhere()

getSlicesWhere(string  $where, array  $params = [], string  $orderDirection = 'ASC', ?int  $limit = null) : self[]

Parameters

string $where
array $params
string $orderDirection
?int $limit

Returns

self[] —