Documentation

rex_be_page_main extends rex_be_page
in package

Backend main 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.
getBlock()  : string
Returns the navigation block.
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.
getPrio()  : int
Returns the priority.
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.
setBlock()  : $this
Sets the navigation block.
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.
setPrio()  : $this
Sets the priority.
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 $block, string $key, string $title) : mixed
Parameters
$block : string

Navigation block

$key : string
$title : string
Tags
throws
InvalidArgumentException

addItemClass()

Adds an item class.

public addItemClass(string $class) : $this
Parameters
$class : string
Tags
throws
InvalidArgumentException
Return values
$this

addLinkClass()

Adds an link class.

public addLinkClass(string $class) : $this
Parameters
$class : string
Tags
throws
InvalidArgumentException
Return values
$this

addSubpage()

Adds a subpage.

public addSubpage(self $subpage) : $this
Parameters
$subpage : self
Return values
$this

allowsPjax()

Returns whether the page allows pjax.

public allowsPjax() : bool
Return values
bool

checkPermission()

Checks whether the given user has permission for the page.

public checkPermission(rex_user $user) : bool
Parameters
$user : rex_user
Return values
bool

getBlock()

Returns the navigation block.

public getBlock() : string
Return values
string

getFirstSubpagesLeaf()

Returns the first leaf of the subpages tree.

public getFirstSubpagesLeaf() : self
Return values
self

getFullKey()

Returns the full page path.

public getFullKey() : string
Return values
string

getHref()

Returns the page href.

public getHref() : string
Return values
string

getIcon()

Returns the icon.

public getIcon() : string|null
Return values
string|null

getItemAttr()

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
template

T as ?string

psalm-return

(T is string ? string : array<string, string>)

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
string

getLinkAttr()

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
template

T as ?string

psalm-return

(T is string ? string : array<string, string>)

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

getPath()

Returns the path which will be included directly by the core.

public getPath() : string|null
Return values
string|null

getPrio()

Returns the priority.

public getPrio() : int
Return values
int

getRequiredPermissions()

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

getSubpages()

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

getTitle()

Returns the title.

public getTitle() : string
Return values
string

hasHref()

Returns whether the page has a custom href.

public hasHref() : bool
Return values
bool

hasIcon()

Returns whether the page has an icon.

public hasIcon() : bool
Return values
bool

hasLayout()

Returns whether tha page has layout.

public hasLayout() : bool
Return values
bool

hasNavigation()

Returns whether the page has a navigation.

public hasNavigation() : bool
Return values
bool

hasPath()

Returns whether a path is set.

public hasPath() : bool
Return values
bool

hasSubPath()

Returns whether a subpath is set.

public hasSubPath() : bool
Return values
bool

isActive()

Returns whether the page is active.

public isActive() : bool
Return values
bool

isHidden()

Returns whether the page is hidden.

public isHidden() : bool
Return values
bool

isPopup()

Returns whether the page is a popup.

public isPopup() : bool
Return values
bool

removeItemAttr()

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

setBlock()

Sets the navigation block.

public setBlock(string $block) : $this
Parameters
$block : string
Return values
$this

setHasLayout()

Sets whether the page has layout.

public setHasLayout(bool $hasLayout) : $this
Parameters
$hasLayout : bool
Return values
$this

setHasNavigation()

Sets whether the page has a navigation.

public setHasNavigation(bool $hasNavigation) : $this
Parameters
$hasNavigation : bool
Return values
$this

setHidden()

Sets whether the page is hidden.

public setHidden([bool $hidden = true ]) : $this
Parameters
$hidden : bool = true
Return values
$this

setHref()

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
$this

setIcon()

Sets whether the page has an icon.

public setIcon(string $icon) : $this
Parameters
$icon : string
Return values
$this

setIsActive()

Sets whether the page is active.

public setIsActive([bool $isActive = true ]) : $this
Parameters
$isActive : bool = true
Return values
$this

setItemAttr()

Sets an item attribute.

public setItemAttr(string $name, string $value) : $this
Parameters
$name : string
$value : string
Tags
throws
InvalidArgumentException
Return values
$this

setLinkAttr()

Sets an link attribute.

public setLinkAttr(string $name, string $value) : $this
Parameters
$name : string
$value : string
Tags
throws
InvalidArgumentException
Return values
$this

setPath()

Set the page path which will be included directly by the core.

public setPath(string $path) : $this
Parameters
$path : string
Return values
$this

setPjax()

Sets whether the page allows pjax.

public setPjax([bool $pjax = true ]) : $this
Parameters
$pjax : bool = true
Return values
$this

setPopup()

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
$this

setPrio()

Sets the priority.

public setPrio(int $prio) : $this
Parameters
$prio : int
Return values
$this

setRequiredPermissions()

Sets the required permissions.

public setRequiredPermissions(array<int, string>|string $perm) : $this
Parameters
$perm : array<int, string>|string
Return values
$this

setSubpages()

Sets all subpages.

public setSubpages(array<string|int, self> $subpages) : $this
Parameters
$subpages : array<string|int, self>
Return values
$this

setSubPath()

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
$this

setTitle()

Sets the page title.

public setTitle(string $title) : $this
Parameters
$title : string
Return values
$this

        
On this page

Search results