ApiExplorer
extends AdminFeature
in package
implements
iAdminFeature
Class for Admin Feature
Table of Contents
Interfaces
Properties
- $api : null|MagratheaApi
- $apiName : mixed
- $apiUrl : mixed
- $featureClassPath : mixed
- $featureIcon : mixed
- $featureId : string
- $featureName : string
Methods
- __construct() : mixed
- AddCSS() : AdminFeature
- Add a CSS file to admin
- AddJs() : AdminFeature
- Add a JS file to admin
- GetAuthentication() : mixed
- GetEndpoints() : mixed
- 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
- GetSubpageUrl() : mixed
- HasPermission() : bool
- Checks if user has permission to see a feature
- Index() : mixed
- IsFeatureActive() : bool
- checks if this feature is currently being displayed (for menu highlighting)
- SetApi() : ApiExplorer
- Sets the API for the feature
- SetClassPath() : mixed
- Sets feature class path
Properties
$api
public
null|MagratheaApi
$api
= null
$apiName
public
mixed
$apiName
= null
$apiUrl
public
mixed
$apiUrl
= null
$featureClassPath
public
mixed
$featureClassPath
= __DIR__
$featureIcon
public
mixed
$featureIcon
= null
$featureId
public
string
$featureId
= "ApiExplorer"
$featureName
public
string
$featureName
= "Explore API"
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
GetAuthentication()
public
GetAuthentication() : mixed
GetEndpoints()
public
GetEndpoints() : mixed
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
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
IsFeatureActive()
checks if this feature is currently being displayed (for menu highlighting)
public
IsFeatureActive() : bool
Return values
boolSetApi()
Sets the API for the feature
public
SetApi(MagratheaApi $api) : ApiExplorer
Parameters
- $api : MagratheaApi
-
Api
Return values
ApiExplorer —itself
SetClassPath()
Sets feature class path
public
SetClassPath(mixed $path) : mixed
Parameters
- $path : mixed