Skip to content

Administrator

Keramat Jokar edited this page May 13, 2024 · 1 revision

How to access the administrator object

$this->administrator->method();

requireOwner()

Make sure only owners can access

setTitle($title)

Add an extra page title

String $title

loadModules()

Load and read all module manifests

[Boolean] hasConfigs($moduleName)

Check if the module has any configs

String $moduleName

[Array] getModules()

Get the modules and their manifests as an array

view($content [, $css, $js])

Loads the template

String $content page content

(Optional) String $css path to your css file

(Optional) String $js path to your js file

[String] box($title, $body [, $full, $css, $js])

Shorthand for loading a content box

String $title

String $body

(Optional) Boolean $full

(Optional) $css

(Optional) $js

[Float] getVersion()

Get the FusionCMS version

[Boolean] isEnabled($moduleName)

Get if the module is enabled or not

$moduleName