Documentation

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<string|int, self>
Return all slices for an article that have a certain clang or revision.
getSlicesForArticleOfType()  : array<string|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<string|int, self>
getSliceWhere()  : self|null

Constants

Methods

getArticleId()

public getArticleId() : int
Return values
int

getArticleSliceById()

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|null

getClang()

public getClang() : int
Tags
deprecated

since redaxo 5.6, use getClangId() instead

Return values
int

getFirstSliceForArticle()

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|null

getFirstSliceForCtype()

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|null
public getLink(int $index) : int|null
Parameters
$index : int
Return values
int|null
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>|null

getLinkUrl()

public getLinkUrl(int $index) : string|null
Parameters
$index : int
Return values
string|null

getMedia()

public getMedia(int $index) : string|null
Parameters
$index : int
Return values
string|null

getMediaList()

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>|null

getMediaUrl()

public getMediaUrl(int $index) : string|null
Parameters
$index : int
Return values
string|null

getNextSlice()

Return the next slice for this article.

public getNextSlice([bool $ignoreOfflines = false ]) : self|null
Parameters
$ignoreOfflines : bool = false
Return values
self|null

getPreviousSlice()

public getPreviousSlice([bool $ignoreOfflines = false ]) : self|null
Parameters
$ignoreOfflines : bool = false
Return values
self|null

getSlice()

Gibt den Slice formatiert zurück.

public getSlice() : string
Tags
since
4.1
  • 29.05.2008
see
rex_article_content::getSlice()
Return values
string

getSlicesForArticle()

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<string|int, self>
Parameters
$anArticleId : int
$clang : false|int = false
$revision : int = 0
$ignoreOfflines : bool = false
Return values
array<string|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<string|int, self>
Parameters
$anArticleId : int
$aModuletypeId : int
$clang : false|int = false
$revision : int = 0
$ignoreOfflines : bool = false
Return values
array<string|int, self>

getValue()

public getValue(T $index) : int|string|null
Parameters
$index : T
Tags
template

T of int|string

psalm-return

(T is int ? string|null : int|string|null)

Return values
int|string|null

getValueArray()

public getValueArray(int $index) : array<string|int, mixed>|null
Parameters
$index : int
Return values
array<string|int, mixed>|null

__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<string|int, self>
Parameters
$where : literal-string
$params : array<string|int, mixed> = []
$orderDirection : self::ORDER_* = 'ASC'
$limit : int|null = null
Return values
array<string|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
Return values
self|null

        
On this page

Search results