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
$debug
public
bool
$debug
= \false
$info
public
string
$info
$template_attributes
public
array<string|int, mixed>
$template_attributes
$template_id
public
int
$template_id
= 0
$warning
public
string
$warning
$ARTICLE
protected
rex_sql|null
$ARTICLE
$article_id
protected
int
$article_id
= 0
$category_id
protected
int
$category_id
$clang
protected
int
$clang
$ctype
protected
int
$ctype
= -1
$eval
protected
bool
$eval
= \false
$function
protected
"add"|"edit"
$function
$getSlice
protected
int
$getSlice
= 0
$mode
protected
"view"|"edit"
$mode
= 'view'
$slice_id
protected
int
$slice_id
= 0
$slice_revision
protected
int
$slice_revision
= 0
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
stringgetArticleId()
public
getArticleId() : int
Return values
intgetArticleTemplate()
public
getArticleTemplate() : string
Return values
stringgetClang()
public
getClang() : int
Tags
Return values
intgetClangId()
public
getClangId() : int
Return values
intgetCurrentSlice()
public
getCurrentSlice() : rex_article_slice
Return values
rex_article_slicegetSlice()
Returns the content of the given slice-id.
public
getSlice(int $sliceId) : string
Parameters
- $sliceId : int
-
A article-slice id
Return values
stringgetTemplateId()
public
getTemplateId() : int
Return values
intgetValue()
public
getValue(string $value) : string|int|null
Parameters
- $value : string
Return values
string|int|nullhasValue()
public
hasValue(string $value) : bool
Parameters
- $value : string
Return values
boolreplaceCommonVars()
public
replaceCommonVars(string $content[, int|null $templateId = null ]) : string
Parameters
- $content : string
- $templateId : int|null = null
Return values
stringsetArticleId()
public
setArticleId(int $articleId) : bool
Parameters
- $articleId : int
Return values
boolsetClang()
public
setClang(int $value) : void
Parameters
- $value : int
setEval()
public
setEval(bool $value) : void
Parameters
- $value : bool
setFunction()
public
setFunction("add"|"edit" $function) : void
Parameters
- $function : "add"|"edit"
setMode()
public
setMode("view"|"edit" $mode) : void
Parameters
- $mode : "view"|"edit"
setSliceId()
public
setSliceId(int $value) : void
Parameters
- $value : int
setSliceRevision()
public
setSliceRevision(int $sr) : void
Parameters
- $sr : int
setTemplateId()
public
setTemplateId(int $templateId) : void
Parameters
- $templateId : int
_getValue()
protected
_getValue(string $value) : string|int|null
Parameters
- $value : string
Return values
string|int|nullcorrectValue()
protected
correctValue(string $value) : string
Parameters
- $value : string
Return values
stringgetSqlInstance()
protected
getSqlInstance() : rex_sql
Return values
rex_sqlgetStreamOutput()
protected
getStreamOutput(string $path, string $content) : string
Parameters
- $path : string
- $content : string
Return values
stringoutputSlice()
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
stringpostArticle()
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
stringpreArticle()
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
stringreplaceLinks()
protected
replaceLinks(string $content) : string
Parameters
- $content : string
Return values
stringreplaceObjectVars()
protected
replaceObjectVars(rex_sql $sql, string $content) : string
Parameters
- $sql : rex_sql
- $content : string
Return values
stringreplaceVars()
protected
replaceVars(rex_sql $sql, string $content) : string
Parameters
- $sql : rex_sql
- $content : string