Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
ControllerBase Class Reference

Default controller used in a new project. More...

+ Inheritance diagram for ControllerBase:

Public Member Functions

 initialize ()
 Method called before each action Can be override in derived class.
 
 finalize ()
 Method called after each action Can be override in derived class.
 
- Public Member Functions inherited from Controller
 index ()
 Default action.
 
 __construct ()
 Constructor initialize $view variable.
 
 loadView (string $viewName, $pData=null, bool $asString=false)
 Loads the view $viewName possibly passing the variables $pdata.
 
 loadDefaultView ($pData=null, bool $asString=false)
 Loads the default view (controllerName/actionName) possibly passing the variables $pdata.
 
 getDefaultViewName ()
 Returns the default view name for this controller/action i.e ControllerName/actionName.html for the action actionName in ControllerName If there is an activeTheme @activeTheme/ControllerName/actionName.html
 
 isValid ($action)
 Returns True if access to the controller is allowed To be override in sub classes.
 
 onInvalidControl ()
 Called if isValid () returns false To be override in sub classes.
 
 forward (string $controller, string $action='index', $params=[], bool $initialize=false, bool $finalize=false)
 Loads the controller $controller and calls its $action method by passing the parameters $params.
 
 redirectToRoute (string $routeName, $parameters=[], bool $initialize=false, bool $finalize=false)
 Redirect to a route by its name.
 
 getView ()
 Returns the associated view instance.
 

Protected Attributes

string $headerView = '@activeTheme/main/vHeader.html'
 
string $footerView = '@activeTheme/main/vFooter.html'
 
- Protected Attributes inherited from Controller
View $view
 

Detailed Description

Default controller used in a new project.

Ubiquity\controllers$ControllerBase This class is part of Ubiquity

Author
jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
Version
1.0.3

Definition at line 16 of file ControllerBase.php.

Member Function Documentation

◆ finalize()

finalize ( )

Method called after each action Can be override in derived class.

Reimplemented from Controller.

Definition at line 26 of file ControllerBase.php.

◆ initialize()

initialize ( )

Method called before each action Can be override in derived class.

Reimplemented from Controller.

Reimplemented in MultiResourceCRUDController.

Definition at line 20 of file ControllerBase.php.

Field Documentation

◆ $footerView

string $footerView = '@activeTheme/main/vFooter.html'
protected

Definition at line 18 of file ControllerBase.php.

◆ $headerView

string $headerView = '@activeTheme/main/vHeader.html'
protected

Definition at line 17 of file ControllerBase.php.


The documentation for this class was generated from the following file: