Magrathea PHP 2

Admin
in package
implements iAdmin

Class for managing Magrathea's Admin

Table of Contents

Interfaces

iAdmin

Properties

$adminLogo  : mixed
$extraMenu  : mixed
$primaryColor  : mixed
$title  : mixed
$adminFeatures  : mixed

Methods

__construct()  : mixed
AddFeaturesArray()  : Admin
inserts an array of features
AddJs()  : Admin
Add a JS file
AddMagratheaFeatures()  : mixed
AddMagratheaMenu()  : AdminMenu
AddMenuItem()  : itself
Adds a menu item (before logout)
AddTests()  : Admin
Auth()  : bool
BuildMenu()  : AdminMenu
GetFeatures()  : mixed
Initialize()  : mixed
SetAdminLogo()  : Admin
Defines admin logo
SetFeatures()  : mixed
SetLogo()  : Admin
Defines admin logo (alias)
SetPrimaryColor()  : Admin
Sets color as decimal value
SetPrimaryColorDecimal()  : Admin
Sets color as decimal value
SetTitle()  : Admin
Sets title
AddFeature()  : Admin
sets admin feature

Properties

public mixed $adminLogo = __DIR__ . "/views/logo.svg"

$extraMenu

public mixed $extraMenu = []

$primaryColor

public mixed $primaryColor = "203, 128, 8"

$title

public mixed $title = "Magrathea Admin"

$adminFeatures

protected mixed $adminFeatures = []

Methods

__construct()

public __construct() : mixed

AddFeaturesArray()

inserts an array of features

public AddFeaturesArray(array<string|int, mixed> $arrFeatures) : Admin
Parameters
$arrFeatures : array<string|int, mixed>

array of features

Return values
Admin

itself

AddJs()

Add a JS file

public AddJs(string $filePath) : Admin
Parameters
$filePath : string

path of js file

Return values
Admin

itself

AddMagratheaFeatures()

public AddMagratheaFeatures() : mixed

AddMenuItem()

Adds a menu item (before logout)

public AddMenuItem(array<string|int, mixed> ...$item) : itself
Parameters
$item : array<string|int, mixed>

menu item ["title", "link"]

Return values
itself

Auth()

public Auth(mixed $user) : bool
Parameters
$user : mixed
Return values
bool

GetFeatures()

public GetFeatures() : mixed

Initialize()

public Initialize() : mixed

Defines admin logo

public SetAdminLogo(string $logo) : Admin
Parameters
$logo : string

logo address

Return values
Admin

itself

SetFeatures()

public SetFeatures() : mixed

Defines admin logo (alias)

public SetLogo(string $logo) : Admin
Parameters
$logo : string

logo address

Return values
Admin

itself

SetPrimaryColor()

Sets color as decimal value

public SetPrimaryColor(string $color) : Admin
Parameters
$color : string

Color as hexaRGB

Return values
Admin

itself

SetPrimaryColorDecimal()

Sets color as decimal value

public SetPrimaryColorDecimal(string $color) : Admin
Parameters
$color : string

Color as Decimal RGB

Return values
Admin

itself

SetTitle()

Sets title

public SetTitle(mixed $t) : Admin
Parameters
$t : mixed
Return values
Admin

itself


        
On this page

Search results