PHP Class Frozennode\Administrator\AdminController

Inheritance: extends Illuminate\Routing\Controller
Datei anzeigen Open project: summerblue/administrator

Protected Properties

Property Type Description
$formRequestErrors string
$layout string
$request Illuminate\Http\Request
$session Illuminate\Session\SessionManager

Public Methods

Method Description
__construct ( Illuminate\Http\Request $request, Illuminate\Session\SessionManager $session )
batchDelete ( string $modelName ) : JSON Batch delete
customModelAction ( string $modelName ) : JSON POST method for handling custom model actions.
customModelItemAction ( string $modelName, integer $id = null ) : JSON POST method for handling custom model item actions.
dashboard ( ) : Response Shows the dashboard page.
delete ( string $modelName, integer $id ) : JSON POST delete method that accepts data via JSON POST and either saves an old.
displayFile ( ) : Image The GET method that displays a file field's file.
fileDownload ( ) : JSON The GET method that runs when a user needs to download a file.
fileUpload ( string $modelName, string $fieldName ) : JSON The POST method that runs when a user uploads a file on a file field.
index ( $modelName ) : Response The main view for any of the data models.
item ( string $modelName, mixed $itemId ) Gets the item edit page / information.
page ( $page ) : Response The pages view.
results ( string $modelName ) : array Gets the database results for the current model.
rowsPerPage ( string $modelName ) : JSON The POST method for setting a user's rows per page.
save ( string $modelName, integer $id = false ) : JSON POST save method that accepts data via JSON POST and either saves an old item (if id is valid) or creates a new one.
settings ( string $settingsName ) : Response The main view for any of the settings pages.
settingsCustomAction ( string $settingsName ) : JSON POST method for handling custom actions on the settings page.
settingsSave ( ) : JSON POST save settings method that accepts data via JSON POST and either saves an old item (if id is valid) or creates a new one.
switchLocale ( string $locale ) : JSON POST method for switching a user's locale.
updateOptions ( string $modelName ) : array Gets a list of related items given constraints.

Protected Methods

Method Description
resolveDynamicFormRequestErrors ( Illuminate\Http\Request $request ) POST method to capture any form request errors.

Method Details

__construct() public method

public __construct ( Illuminate\Http\Request $request, Illuminate\Session\SessionManager $session )
$request Illuminate\Http\Request
$session Illuminate\Session\SessionManager

batchDelete() public method

Batch delete
public batchDelete ( string $modelName ) : JSON
$modelName string
return JSON

customModelAction() public method

POST method for handling custom model actions.
public customModelAction ( string $modelName ) : JSON
$modelName string
return JSON

customModelItemAction() public method

POST method for handling custom model item actions.
public customModelItemAction ( string $modelName, integer $id = null ) : JSON
$modelName string
$id integer
return JSON

dashboard() public method

Shows the dashboard page.
public dashboard ( ) : Response
return Response

delete() public method

POST delete method that accepts data via JSON POST and either saves an old.
public delete ( string $modelName, integer $id ) : JSON
$modelName string
$id integer
return JSON

displayFile() public method

The GET method that displays a file field's file.
public displayFile ( ) : Image
return Image / File

fileDownload() public method

The GET method that runs when a user needs to download a file.
public fileDownload ( ) : JSON
return JSON

fileUpload() public method

The POST method that runs when a user uploads a file on a file field.
public fileUpload ( string $modelName, string $fieldName ) : JSON
$modelName string
$fieldName string
return JSON

index() public method

The main view for any of the data models.
public index ( $modelName ) : Response
return Response

item() public method

Gets the item edit page / information.
public item ( string $modelName, mixed $itemId )
$modelName string
$itemId mixed

page() public method

The pages view.
public page ( $page ) : Response
return Response

resolveDynamicFormRequestErrors() protected method

POST method to capture any form request errors.
protected resolveDynamicFormRequestErrors ( Illuminate\Http\Request $request )
$request Illuminate\Http\Request

results() public method

Gets the database results for the current model.
public results ( string $modelName ) : array
$modelName string
return array of rows

rowsPerPage() public method

The POST method for setting a user's rows per page.
public rowsPerPage ( string $modelName ) : JSON
$modelName string
return JSON

save() public method

POST save method that accepts data via JSON POST and either saves an old item (if id is valid) or creates a new one.
public save ( string $modelName, integer $id = false ) : JSON
$modelName string
$id integer
return JSON

settings() public method

The main view for any of the settings pages.
public settings ( string $settingsName ) : Response
$settingsName string
return Response

settingsCustomAction() public method

POST method for handling custom actions on the settings page.
public settingsCustomAction ( string $settingsName ) : JSON
$settingsName string
return JSON

settingsSave() public method

POST save settings method that accepts data via JSON POST and either saves an old item (if id is valid) or creates a new one.
public settingsSave ( ) : JSON
return JSON

switchLocale() public method

POST method for switching a user's locale.
public switchLocale ( string $locale ) : JSON
$locale string
return JSON

updateOptions() public method

Gets a list of related items given constraints.
public updateOptions ( string $modelName ) : array
$modelName string
return array of objects [{id: string} ... {1: 'name'}, ...]

Property Details

$formRequestErrors protected_oe property

protected string $formRequestErrors
return string

$layout protected_oe property

protected string $layout
return string

$request protected_oe property

protected Request,Illuminate\Http $request
return Illuminate\Http\Request

$session protected_oe property

protected SessionManager,Illuminate\Session $session
return Illuminate\Session\SessionManager