rex_be_page
in package
Backend Page Class.
Table of Contents
Methods
- __construct() : mixed
- addItemClass() : $this
- Adds an item class.
- addLinkClass() : $this
- Adds an link class.
- addSubpage() : $this
- Adds a subpage.
- allowsPjax() : bool
- Returns whether the page allows pjax.
- checkPermission() : bool
- Checks whether the given user has permission for the page.
- getFirstSubpagesLeaf() : self
- Returns the first leaf of the subpages tree.
- getFullKey() : string
- Returns the full page path.
- getHref() : string
- Returns the page href.
- getIcon() : string|null
- Returns the icon.
- getItemAttr() : string|array<string|int, mixed>
- Returns an item attribute or all item attributes.
- getKey() : string
- Returns the page key.
- getLinkAttr() : string|array<string|int, mixed>
- Returns an link attribute or all link attributes.
- getParent() : self|null
- Returns the parent page object.
- getPath() : string|null
- Returns the path which will be included directly by the core.
- getRequiredPermissions() : array<int, string>
- Returns the required permission.
- getSubpage() : self|null
- Returns the subpage for the given key.
- getSubpages() : array<string, self>
- Returns all subpages.
- getSubPath() : string|null
- Returns the subpath which should be used by packages to include this page inside their main page.
- getTitle() : string
- Returns the title.
- hasHref() : bool
- Returns whether the page has a custom href.
- hasIcon() : bool
- Returns whether the page has an icon.
- hasLayout() : bool
- Returns whether tha page has layout.
- hasNavigation() : bool
- Returns whether the page has a navigation.
- hasPath() : bool
- Returns whether a path is set.
- hasSubPath() : bool
- Returns whether a subpath is set.
- isActive() : bool
- Returns whether the page is active.
- isHidden() : bool
- Returns whether the page is hidden.
- isPopup() : bool
- Returns whether the page is a popup.
- removeItemAttr() : void
- Removes an item attribute.
- removeItemClass() : void
- Removes an item class.
- removeLinkAttr() : void
- Removes an link attribute.
- removeLinkClass() : void
- Removes an link class.
- setHasLayout() : $this
- Sets whether the page has layout.
- setHasNavigation() : $this
- Sets whether the page has a navigation.
- setHidden() : $this
- Sets whether the page is hidden.
- setHref() : $this
- Sets the page href.
- setIcon() : $this
- Sets whether the page has an icon.
- setIsActive() : $this
- Sets whether the page is active.
- setItemAttr() : $this
- Sets an item attribute.
- setLinkAttr() : $this
- Sets an link attribute.
- setPath() : $this
- Set the page path which will be included directly by the core.
- setPjax() : $this
- Sets whether the page allows pjax.
- setPopup() : $this
- Sets whether the page is a popup page.
- setRequiredPermissions() : $this
- Sets the required permissions.
- setSubpages() : $this
- Sets all subpages.
- setSubPath() : $this
- Set the page subpath which should be used by the packages to include this page inside their main page.
- setTitle() : $this
- Sets the page title.
Methods
__construct()
public
__construct(string $key, string $title) : mixed
Parameters
- $key : string
- $title : string
Tags
addItemClass()
Adds an item class.
public
addItemClass(string $class) : $this
Parameters
- $class : string
Tags
Return values
$thisaddLinkClass()
Adds an link class.
public
addLinkClass(string $class) : $this
Parameters
- $class : string
Tags
Return values
$thisaddSubpage()
Adds a subpage.
public
addSubpage(self $subpage) : $this
Parameters
- $subpage : self
Return values
$thisallowsPjax()
Returns whether the page allows pjax.
public
allowsPjax() : bool
Return values
boolcheckPermission()
Checks whether the given user has permission for the page.
public
checkPermission(rex_user $user) : bool
Parameters
- $user : rex_user
Return values
boolgetFirstSubpagesLeaf()
Returns the first leaf of the subpages tree.
public
getFirstSubpagesLeaf() : self
Return values
selfgetFullKey()
Returns the full page path.
public
getFullKey() : string
Return values
stringgetHref()
Returns the page href.
public
getHref() : string
Return values
stringgetIcon()
Returns the icon.
public
getIcon() : string|null
Return values
string|nullgetItemAttr()
Returns an item attribute or all item attributes.
public
getItemAttr(T $name[, string $default = '' ]) : string|array<string|int, mixed>
Parameters
- $name : T
- $default : string = ''
Tags
Return values
string|array<string|int, mixed> —Attribute value for given $name
or attribute array if $name
is null
getKey()
Returns the page key.
public
getKey() : string
Return values
stringgetLinkAttr()
Returns an link attribute or all link attributes.
public
getLinkAttr(T $name[, string $default = '' ]) : string|array<string|int, mixed>
Parameters
- $name : T
- $default : string = ''
Tags
Return values
string|array<string|int, mixed> —Attribute value for given $name
or attribute array if $name
is null
getParent()
Returns the parent page object.
public
getParent() : self|null
Return values
self|nullgetPath()
Returns the path which will be included directly by the core.
public
getPath() : string|null
Return values
string|nullgetRequiredPermissions()
Returns the required permission.
public
getRequiredPermissions() : array<int, string>
Return values
array<int, string>getSubpage()
Returns the subpage for the given key.
public
getSubpage(string $key) : self|null
Parameters
- $key : string
Return values
self|nullgetSubpages()
Returns all subpages.
public
getSubpages() : array<string, self>
Return values
array<string, self>getSubPath()
Returns the subpath which should be used by packages to include this page inside their main page.
public
getSubPath() : string|null
Return values
string|nullgetTitle()
Returns the title.
public
getTitle() : string
Return values
stringhasHref()
Returns whether the page has a custom href.
public
hasHref() : bool
Return values
boolhasIcon()
Returns whether the page has an icon.
public
hasIcon() : bool
Return values
boolhasLayout()
Returns whether tha page has layout.
public
hasLayout() : bool
Return values
boolhasNavigation()
Returns whether the page has a navigation.
public
hasNavigation() : bool
Return values
boolhasPath()
Returns whether a path is set.
public
hasPath() : bool
Return values
boolhasSubPath()
Returns whether a subpath is set.
public
hasSubPath() : bool
Return values
boolisActive()
Returns whether the page is active.
public
isActive() : bool
Return values
boolisHidden()
Returns whether the page is hidden.
public
isHidden() : bool
Return values
boolisPopup()
Returns whether the page is a popup.
public
isPopup() : bool
Return values
boolremoveItemAttr()
Removes an item attribute.
public
removeItemAttr(string $name) : void
Parameters
- $name : string
removeItemClass()
Removes an item class.
public
removeItemClass(string $class) : void
Parameters
- $class : string
removeLinkAttr()
Removes an link attribute.
public
removeLinkAttr(string $name) : void
Parameters
- $name : string
removeLinkClass()
Removes an link class.
public
removeLinkClass(string $class) : void
Parameters
- $class : string
setHasLayout()
Sets whether the page has layout.
public
setHasLayout(bool $hasLayout) : $this
Parameters
- $hasLayout : bool
Return values
$thissetHasNavigation()
Sets whether the page has a navigation.
public
setHasNavigation(bool $hasNavigation) : $this
Parameters
- $hasNavigation : bool
Return values
$thissetHidden()
Sets whether the page is hidden.
public
setHidden([bool $hidden = true ]) : $this
Parameters
- $hidden : bool = true
Return values
$thissetHref()
Sets the page href.
public
setHref(string|array<string|int, mixed> $href) : $this
Parameters
- $href : string|array<string|int, mixed>
-
Href string or array of params
Return values
$thissetIcon()
Sets whether the page has an icon.
public
setIcon(string $icon) : $this
Parameters
- $icon : string
Return values
$thissetIsActive()
Sets whether the page is active.
public
setIsActive([bool $isActive = true ]) : $this
Parameters
- $isActive : bool = true
Return values
$thissetItemAttr()
Sets an item attribute.
public
setItemAttr(string $name, string $value) : $this
Parameters
- $name : string
- $value : string
Tags
Return values
$thissetLinkAttr()
Sets an link attribute.
public
setLinkAttr(string $name, string $value) : $this
Parameters
- $name : string
- $value : string
Tags
Return values
$thissetPath()
Set the page path which will be included directly by the core.
public
setPath(string $path) : $this
Parameters
- $path : string
Return values
$thissetPjax()
Sets whether the page allows pjax.
public
setPjax([bool $pjax = true ]) : $this
Parameters
- $pjax : bool = true
Return values
$thissetPopup()
Sets whether the page is a popup page.
public
setPopup(bool|string $popup) : $this
The method adds (or removes) also the rex-popup CSS class and sets hasNavigation to false (true). If $popup is a string, the variable will be used for the onclick attribute.
Parameters
- $popup : bool|string
Return values
$thissetRequiredPermissions()
Sets the required permissions.
public
setRequiredPermissions(array<int, string>|string $perm) : $this
Parameters
- $perm : array<int, string>|string
Return values
$thissetSubpages()
Sets all subpages.
public
setSubpages(array<string|int, self> $subpages) : $this
Parameters
- $subpages : array<string|int, self>
Return values
$thissetSubPath()
Set the page subpath which should be used by the packages to include this page inside their main page.
public
setSubPath(string $subPath) : $this
Parameters
- $subPath : string
Return values
$thissetTitle()
Sets the page title.
public
setTitle(string $title) : $this
Parameters
- $title : string