Documentation

rex_article_content_base
in package

Klasse regelt den Zugriff auf Artikelinhalte.

Alle benötigten Daten werden von der DB bezogen.

Table of Contents

Properties

$debug  : bool
$info  : string
$template_attributes  : array<string|int, mixed>
$template_id  : int
$warning  : string
$ARTICLE  : rex_sql|null
$article_id  : int
$category_id  : int
$clang  : int
$ctype  : int
$eval  : bool
$function  : "add"|"edit"
$getSlice  : int
$mode  : "view"|"edit"
$slice_id  : int
$slice_revision  : int

Methods

__construct()  : mixed
getArticle()  : string
Returns the content of the article of the given ctype. If no ctype is given, content of all ctypes is returned.
getArticleId()  : int
getArticleTemplate()  : string
getClang()  : int
getClangId()  : int
getCurrentSlice()  : rex_article_slice
getSlice()  : string
Returns the content of the given slice-id.
getTemplateId()  : int
getValue()  : string|int|null
hasValue()  : bool
replaceCommonVars()  : string
setArticleId()  : bool
setClang()  : void
setEval()  : void
setFunction()  : void
setMode()  : void
setSliceId()  : void
setSliceRevision()  : void
setTemplateId()  : void
_getValue()  : string|int|null
correctValue()  : string
getSqlInstance()  : rex_sql
getStreamOutput()  : string
outputSlice()  : string
Outputs a slice.
postArticle()  : string
Method which gets called, after all slices have been processed.
preArticle()  : string
Method which gets called, before the slices of the article are processed.
replaceLinks()  : string
replaceObjectVars()  : string
replaceVars()  : string

Properties

Methods

__construct()

public __construct([int|null $articleId = null ][, int|null $clang = null ]) : mixed
Parameters
$articleId : int|null = null
$clang : int|null = null

getArticle()

Returns the content of the article of the given ctype. If no ctype is given, content of all ctypes is returned.

public getArticle([int $curctype = -1 ]) : string
Parameters
$curctype : int = -1

The ctype to fetch, or -1 for all ctypes

Return values
string

getClang()

public getClang() : int
Tags
deprecated

since redaxo 5.6, use getClangId() instead

Return values
int

getSlice()

Returns the content of the given slice-id.

public getSlice(int $sliceId) : string
Parameters
$sliceId : int

A article-slice id

Return values
string

getValue()

public getValue(string $value) : string|int|null
Parameters
$value : string
Return values
string|int|null

hasValue()

public hasValue(string $value) : bool
Parameters
$value : string
Return values
bool

replaceCommonVars()

public replaceCommonVars(string $content[, int|null $templateId = null ]) : string
Parameters
$content : string
$templateId : int|null = null
Return values
string

setArticleId()

public setArticleId(int $articleId) : bool
Parameters
$articleId : int
Return values
bool

setFunction()

public setFunction("add"|"edit" $function) : void
Parameters
$function : "add"|"edit"

setTemplateId()

public setTemplateId(int $templateId) : void
Parameters
$templateId : int

_getValue()

protected _getValue(string $value) : string|int|null
Parameters
$value : string
Return values
string|int|null

correctValue()

protected correctValue(string $value) : string
Parameters
$value : string
Return values
string

getStreamOutput()

protected getStreamOutput(string $path, string $content) : string
Parameters
$path : string
$content : string
Return values
string

outputSlice()

Outputs a slice.

protected outputSlice(rex_sql $artDataSql, int $moduleIdToAdd) : string
Parameters
$artDataSql : rex_sql

A rex_sql instance containing all slice and module data

$moduleIdToAdd : int

The id of the module, which was selected using the ModuleSelect

Return values
string

postArticle()

Method which gets called, after all slices have been processed.

protected postArticle(string $articleContent, int $moduleId) : string
Parameters
$articleContent : string

The content of the article

$moduleId : int

A module id

Return values
string

preArticle()

Method which gets called, before the slices of the article are processed.

protected preArticle(string $articleContent, int $moduleId) : string
Parameters
$articleContent : string

The content of the article

$moduleId : int

A module id

Return values
string
protected replaceLinks(string $content) : string
Parameters
$content : string
Return values
string

replaceObjectVars()

protected replaceObjectVars(rex_sql $sql, string $content) : string
Parameters
$sql : rex_sql
$content : string
Return values
string

replaceVars()

protected replaceVars(rex_sql $sql, string $content) : string
Parameters
$sql : rex_sql
$content : string
Return values
string

        
On this page

Search results