Magrathea PHP 2

AdminCrudObject extends AdminFeature
in package
implements iAdminFeature

Class for Admin Object

Table of Contents

Interfaces

iAdminFeature

Properties

$control  : MagratheaModelControl
$featureClassPath  : mixed
$featureIcon  : mixed
$featureId  : string
$featureName  : string
$fullObjectName  : string
$object  : MagratheaModel
$objectName  : string

Methods

__construct()  : mixed
AddCSS()  : AdminFeature
Add a CSS file to admin
AddJs()  : AdminFeature
Add a JS file to admin
Columns()  : array<string|int, mixed>
Gets the columns for display the list
Delete()  : mixed
Deletes the object
Fields()  : array<string|int, mixed>
Gets the array of fields for a object form
Form()  : mixed
Display a form for the object
GetDeleteButton()  : array<string|int, mixed>
Gets the button for deleting an object
GetEditColumn()  : array<string|int, mixed>
Gets the column value for editing an object row
GetField()  : array<string|int, mixed>
Get a field related to type
GetHeaderTitle()  : string
Gets the title of the page
GetMenuItem()  : array<string|int, mixed>
returns the menu item
GetPage()  : mixed
prints index page (default at index.php, located in class path) loads [$featureClass] var with own class to the index page
GetSaveButton()  : array<string|int, mixed>
Gets the button for saving an object
GetSubpageUrl()  : mixed
HasPermission()  : bool
Checks if user has permission to see a feature
Index()  : mixed
Initialize()  : mixed
IsFeatureActive()  : bool
checks if this feature is currently being displayed (for menu highlighting)
List()  : mixed
Display the list of objects
PrintButtonNew()  : mixed
Prints a button for adding new object
ReturnError()  : mixed
ReturnException()  : mixed
Save()  : mixed
Saves the object
SetClassPath()  : mixed
Sets feature class path
SetControl()  : AdminCrudObject
Sets the control for crud
SetObject()  : AdminCrudObject
Sets the object for crud
ShowObjectNotFound()  : mixed

Properties

$featureClassPath

public mixed $featureClassPath = __DIR__

Methods

Columns()

Gets the columns for display the list

public Columns() : array<string|int, mixed>
Return values
array<string|int, mixed>

Fields()

Gets the array of fields for a object form

public Fields(MagratheaModel $object) : array<string|int, mixed>
Parameters
$object : MagratheaModel

object for the form

Return values
array<string|int, mixed>

GetDeleteButton()

Gets the button for deleting an object

public GetDeleteButton() : array<string|int, mixed>
Return values
array<string|int, mixed>

GetEditColumn()

Gets the column value for editing an object row

public GetEditColumn() : array<string|int, mixed>
Return values
array<string|int, mixed>

GetField()

Get a field related to type

public GetField(string $key, string $type) : array<string|int, mixed>
Parameters
$key : string

Object property

$type : string

Object type

Return values
array<string|int, mixed>

GetHeaderTitle()

Gets the title of the page

public GetHeaderTitle() : string
Return values
string

GetMenuItem()

returns the menu item

public GetMenuItem() : array<string|int, mixed>
Return values
array<string|int, mixed>

["title", "name", "icon", "link", "type"]

GetPage()

prints index page (default at index.php, located in class path) loads [$featureClass] var with own class to the index page

public GetPage() : mixed

GetSaveButton()

Gets the button for saving an object

public GetSaveButton() : array<string|int, mixed>
Return values
array<string|int, mixed>

GetSubpageUrl()

public GetSubpageUrl(mixed $subpage[, mixed $params = [] ]) : mixed
Parameters
$subpage : mixed
$params : mixed = []

HasPermission()

Checks if user has permission to see a feature

public HasPermission([mixed $action = null ]) : bool
Parameters
$action : mixed = null
Return values
bool

has it?

IsFeatureActive()

checks if this feature is currently being displayed (for menu highlighting)

public IsFeatureActive() : bool
Return values
bool

PrintButtonNew()

Prints a button for adding new object

public PrintButtonNew() : mixed

ReturnError()

public ReturnError(mixed $err) : mixed
Parameters
$err : mixed

ReturnException()

public ReturnException(mixed $ex[, mixed $data = null ]) : mixed
Parameters
$ex : mixed
$data : mixed = null

SetClassPath()

Sets feature class path

public SetClassPath(mixed $path) : mixed
Parameters
$path : mixed

ShowObjectNotFound()

public ShowObjectNotFound(mixed $id) : mixed
Parameters
$id : mixed

        
On this page

Search results