rex_article
extends rex_structure_element
in package
Object Oriented Framework: Bildet einen Artikel der Struktur ab.
Table of Contents
Properties
- $catname : string
- $catpriority : int
- $clang_id : int
- $classVars : array<int, string>|null
- $createdate : int
- $createuser : string
- $id : int
- $name : string
- $parent_id : int
- $path : string
- $priority : int
- $startarticle : bool
- $status : int
- $template_id : int
- $updatedate : int
- $updateuser : string
Methods
- clearInstance() : void
- Removes the instance of the given key.
- clearInstanceList() : void
- Clears the instance list of the given key.
- clearInstanceListPool() : void
- Clears the instance list pool.
- clearInstancePool() : void
- Clears the instance pool.
- get() : static|null
- Return an rex_structure_element object based on an id.
- getCategory() : rex_category|null
- Returns the parent category.
- getCategoryId() : int
- Returns the category id.
- getClang() : int
- Returns the clang of the category.
- getClangId() : int
- Returns the clang of the category.
- getClassVars() : array<int, string>
- Returns an Array containing article field names.
- getClosest() : self|null
- Returns the closest element from parent tree (including itself) where the callback returns true.
- getClosestValue() : string|int|null
- Returns the value from this element or from the closest parent where the value is set.
- getCreateDate() : int
- Returns the creation date.
- getCreateUser() : string
- Returns the creator.
- getCurrent() : self|null
- Return the current article.
- getCurrentId() : int
- Return the current article id.
- getId() : int
- Returns the id of the article.
- getName() : string
- Returns the name of the article.
- getNotfoundArticle() : self|null
- Return the site wide notfound article.
- getNotfoundArticleId() : int
- Return the site wide notfound article id.
- getParent() : static|null
- Returns the parent object of the article.
- getParentId() : int
- Returns the parent_id of the article.
- getParentTree() : array<int, rex_category>
- Get an array of all parentCategories.
- getPath() : string
- Returns the path of the category/article.
- getPathAsArray() : array<int, int>
- Returns the path ids of the category/article as an array.
- getPriority() : int
- Returns the article priority.
- getRootArticles() : array<int, self>
- Return a list of top-level articles.
- getSiteStartArticle() : self|null
- Return the site wide start article.
- getSiteStartArticleId() : int
- Return the site wide start article id.
- getTemplateId() : int
- Returns the template id.
- getUpdateDate() : int
- Returns the last update date.
- getUpdateUser() : string
- Returns the last update user.
- getUrl() : string
- Returns a url for linking to this article.
- getValue() : string|int|null
- Returns Object Value.
- hasTemplate() : bool
- Returns true if article has a template.
- hasValue() : bool
- inParentTree() : bool
- Checks if $anObj is in the parent tree of the object.
- isNotFoundArticle() : bool
- Returns true if this Article is the not found article.
- isOnline() : bool
- Returns true if article is online.
- isOnlineIncludingParents() : bool
- Returns true if this element and all parents are online.
- isPermitted() : bool
- Returns whether the element is permitted.
- isSiteStartArticle() : bool
- Returns true if this Article is the Startpage for the entire site.
- isStartArticle() : bool
- Returns true if this Article is the Startpage for the category.
- resetClassVars() : void
- toLink() : string
- Returns a link to this article.
- __construct() : mixed
- _hasValue() : bool
- _toAttributeString() : string
- addInstance() : void
- Adds an instance.
- addInstanceList() : void
- Adds an instance list.
- getChildElements() : array<int, static>
- getInstance() : static|null
- Returns the instance for the given key.
- getInstanceList() : array<string|int, mixed>
- Returns the instance list for the given key.
- hasInstance() : bool
- Checks whether an instance exists for the given key.
- hasInstanceList() : bool
- Checks whether an instance list exists for the given key.
Properties
$catname
protected
string
$catname
= ''
$catpriority
protected
int
$catpriority
= 0
$clang_id
protected
int
$clang_id
= 0
$classVars
protected
static array<int, string>|null
$classVars
$createdate
protected
int
$createdate
= 0
$createuser
protected
string
$createuser
= ''
$id
protected
int
$id
= 0
$name
protected
string
$name
= ''
$parent_id
protected
int
$parent_id
= 0
$path
protected
string
$path
= ''
$priority
protected
int
$priority
= 0
$startarticle
protected
bool
$startarticle
= \false
$status
protected
int
$status
= 0
$template_id
protected
int
$template_id
= 0
$updatedate
protected
int
$updatedate
= 0
$updateuser
protected
string
$updateuser
= ''
Methods
clearInstance()
Removes the instance of the given key.
public
static clearInstance(mixed $key) : void
Parameters
- $key : mixed
-
Key
clearInstanceList()
Clears the instance list of the given key.
public
static clearInstanceList(mixed $key) : void
Parameters
- $key : mixed
-
Key
clearInstanceListPool()
Clears the instance list pool.
public
static clearInstanceListPool() : void
clearInstancePool()
Clears the instance pool.
public
static clearInstancePool() : void
get()
Return an rex_structure_element object based on an id.
public
static get(int $id[, int $clang = null ]) : static|null
The instance will be cached in an instance-pool and therefore re-used by a later call.
Parameters
- $id : int
-
the article id
- $clang : int = null
-
the clang id
Return values
static|null —A rex_structure_element instance typed to the late-static binding type of the caller
getCategory()
Returns the parent category.
public
getCategory() : rex_category|null
Return values
rex_category|nullgetCategoryId()
Returns the category id.
public
getCategoryId() : int
Return values
intgetClang()
Returns the clang of the category.
public
getClang() : int
Tags
Return values
intgetClangId()
Returns the clang of the category.
public
getClangId() : int
Return values
intgetClassVars()
Returns an Array containing article field names.
public
static getClassVars() : array<int, string>
Return values
array<int, string>getClosest()
Returns the closest element from parent tree (including itself) where the callback returns true.
public
getClosest(callable(self): bool $callback) : self|null
Parameters
- $callback : callable(self): bool
Return values
self|nullgetClosestValue()
Returns the value from this element or from the closest parent where the value is set.
public
getClosestValue(string $key) : string|int|null
Parameters
- $key : string
Return values
string|int|nullgetCreateDate()
Returns the creation date.
public
getCreateDate() : int
Return values
intgetCreateUser()
Returns the creator.
public
getCreateUser() : string
Return values
stringgetCurrent()
Return the current article.
public
static getCurrent([int $clang = null ]) : self|null
Parameters
- $clang : int = null
Return values
self|nullgetCurrentId()
Return the current article id.
public
static getCurrentId() : int
Return values
intgetId()
Returns the id of the article.
public
getId() : int
Return values
intgetName()
Returns the name of the article.
public
getName() : string
Return values
stringgetNotfoundArticle()
Return the site wide notfound article.
public
static getNotfoundArticle([int $clang = null ]) : self|null
Parameters
- $clang : int = null
Return values
self|nullgetNotfoundArticleId()
Return the site wide notfound article id.
public
static getNotfoundArticleId() : int
Return values
intgetParent()
Returns the parent object of the article.
public
getParent() : static|null
Return values
static|nullgetParentId()
Returns the parent_id of the article.
public
getParentId() : int
Return values
intgetParentTree()
Get an array of all parentCategories.
public
getParentTree() : array<int, rex_category>
Returns an array of rex_structure_element objects.
Return values
array<int, rex_category>getPath()
Returns the path of the category/article.
public
getPath() : string
Return values
stringgetPathAsArray()
Returns the path ids of the category/article as an array.
public
getPathAsArray() : array<int, int>
Return values
array<int, int>getPriority()
Returns the article priority.
public
getPriority() : int
Return values
intgetRootArticles()
Return a list of top-level articles.
public
static getRootArticles([bool $ignoreOfflines = false ][, int $clang = null ]) : array<int, self>
Parameters
- $ignoreOfflines : bool = false
- $clang : int = null
Return values
array<int, self>getSiteStartArticle()
Return the site wide start article.
public
static getSiteStartArticle([int $clang = null ]) : self|null
Parameters
- $clang : int = null
Return values
self|nullgetSiteStartArticleId()
Return the site wide start article id.
public
static getSiteStartArticleId() : int
Return values
intgetTemplateId()
Returns the template id.
public
getTemplateId() : int
Return values
intgetUpdateDate()
Returns the last update date.
public
getUpdateDate() : int
Return values
intgetUpdateUser()
Returns the last update user.
public
getUpdateUser() : string
Return values
stringgetUrl()
Returns a url for linking to this article.
public
getUrl([array<string|int, mixed> $params = [] ][, string $divider = '&' ]) : string
Parameters
- $params : array<string|int, mixed> = []
- $divider : string = '&'
Return values
stringgetValue()
Returns Object Value.
public
getValue(mixed $value) : string|int|null
Parameters
- $value : mixed
Return values
string|int|nullhasTemplate()
Returns true if article has a template.
public
hasTemplate() : bool
Return values
boolhasValue()
public
static hasValue(string $value) : bool
Parameters
- $value : string
Return values
boolinParentTree()
Checks if $anObj is in the parent tree of the object.
public
inParentTree(self $anObj) : bool
Parameters
- $anObj : self
Return values
boolisNotFoundArticle()
Returns true if this Article is the not found article.
public
isNotFoundArticle() : bool
Return values
boolisOnline()
Returns true if article is online.
public
isOnline() : bool
Return values
boolisOnlineIncludingParents()
Returns true if this element and all parents are online.
public
isOnlineIncludingParents() : bool
Return values
boolisPermitted()
Returns whether the element is permitted.
public
isPermitted() : bool
Return values
boolisSiteStartArticle()
Returns true if this Article is the Startpage for the entire site.
public
isSiteStartArticle() : bool
Return values
boolisStartArticle()
Returns true if this Article is the Startpage for the category.
public
isStartArticle() : bool
Return values
boolresetClassVars()
public
static resetClassVars() : void
toLink()
Returns a link to this article.
public
toLink([array<string|int, mixed> $params = [] ][, array<string|int, mixed> $attributes = [] ][, string $sorroundTag = null ][, array<string|int, mixed> $sorroundAttributes = [] ]) : string
Parameters
- $params : array<string|int, mixed> = []
-
Parameter für den Link
- $attributes : array<string|int, mixed> = []
-
Attribute die dem Link hinzugefügt werden sollen. Default: array
- $sorroundTag : string = null
-
HTML-Tag-Name mit dem der Link umgeben werden soll, z.b. 'li', 'div'. Default: null
- $sorroundAttributes : array<string|int, mixed> = []
-
Attribute die Umgebenden-Element hinzugefügt werden sollen. Default: array
Return values
string__construct()
protected
__construct(array<string|int, mixed> $params) : mixed
Parameters
- $params : array<string|int, mixed>
_hasValue()
protected
static _hasValue(string $value[, array<string|int, mixed> $prefixes = [] ]) : bool
Parameters
- $value : string
- $prefixes : array<string|int, mixed> = []
Return values
bool_toAttributeString()
protected
_toAttributeString(array<string|int, mixed> $attributes) : string
Parameters
- $attributes : array<string|int, mixed>
Return values
stringaddInstance()
Adds an instance.
protected
static addInstance(mixed $key, self $instance) : void
Parameters
- $key : mixed
-
Key
- $instance : self
-
Instance
addInstanceList()
Adds an instance list.
protected
static addInstanceList(mixed $key, array<string|int, mixed> $instanceKeyList) : void
Parameters
- $key : mixed
-
Key
- $instanceKeyList : array<string|int, mixed>
-
Array of instance keys
getChildElements()
protected
static getChildElements(int $parentId, string $listType[, bool $ignoreOfflines = false ][, int $clang = null ]) : array<int, static>
Parameters
- $parentId : int
- $listType : string
- $ignoreOfflines : bool = false
- $clang : int = null
Return values
array<int, static>getInstance()
Returns the instance for the given key.
protected
static getInstance(mixed $key[, callable $createCallback = null ]) : static|null
If the instance does not exist it will be created by calling the $createCallback
Parameters
- $key : mixed
-
Key
- $createCallback : callable = null
-
Callback, will be called to create a new instance
Tags
Return values
static|nullgetInstanceList()
Returns the instance list for the given key.
protected
static getInstanceList(mixed $key, callable $getInstanceCallback[, callable|null $createListCallback = null ]) : array<string|int, mixed>
If the instance list does not exist it will be created by calling the $createListCallback
Parameters
- $key : mixed
-
Key
- $getInstanceCallback : callable
-
Callback, will be called for every list item to get the instance
- $createListCallback : callable|null = null
-
Callback, will be called to create the list of instance keys
Tags
Return values
array<string|int, mixed>hasInstance()
Checks whether an instance exists for the given key.
protected
static hasInstance(mixed $key) : bool
Parameters
- $key : mixed
-
Key
Return values
boolhasInstanceList()
Checks whether an instance list exists for the given key.
protected
static hasInstanceList(mixed $key) : bool
Parameters
- $key : mixed
-
Key