AdminCrudObject
extends AdminFeature
in package
implements
iAdminFeature
Class for Admin Object
Table of Contents
Interfaces
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
$control
public
MagratheaModelControl
$control
$featureClassPath
public
mixed
$featureClassPath
= __DIR__
$featureIcon
public
mixed
$featureIcon
= null
$featureId
public
string
$featureId
$featureName
public
string
$featureName
$fullObjectName
public
string
$fullObjectName
$object
public
MagratheaModel
$object
$objectName
public
string
$objectName
Methods
__construct()
public
__construct() : mixed
AddCSS()
Add a CSS file to admin
public
AddCSS(string $file) : AdminFeature
Parameters
- $file : string
-
absolute path of tile
Return values
AdminFeature —itself
AddJs()
Add a JS file to admin
public
AddJs(string $file) : AdminFeature
Parameters
- $file : string
-
absolute path of tile
Return values
AdminFeature —itself
Columns()
Gets the columns for display the list
public
Columns() : array<string|int, mixed>
Return values
array<string|int, mixed>Delete()
Deletes the object
public
Delete() : 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>Form()
Display a form for the object
public
Form() : 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
stringGetMenuItem()
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?
Index()
public
Index() : mixed
Initialize()
public
Initialize() : mixed
IsFeatureActive()
checks if this feature is currently being displayed (for menu highlighting)
public
IsFeatureActive() : bool
Return values
boolList()
Display the list of objects
public
List() : mixed
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
Save()
Saves the object
public
Save() : mixed
SetClassPath()
Sets feature class path
public
SetClassPath(mixed $path) : mixed
Parameters
- $path : mixed
SetControl()
Sets the control for crud
public
SetControl(MagratheaModelControl $c) : AdminCrudObject
Parameters
- $c : MagratheaModelControl
-
Magrathea Model Control for admin
Return values
AdminCrudObject —itself
SetObject()
Sets the object for crud
public
SetObject(MagratheaModel $object) : AdminCrudObject
Parameters
- $object : MagratheaModel
-
Magrathea Model for admin
Return values
AdminCrudObject —itself
ShowObjectNotFound()
public
ShowObjectNotFound(mixed $id) : mixed
Parameters
- $id : mixed