Class Controller
This class describes the behavior of a controller. All controllers defined in application plugins must extend this class for the application routes work.
- Hawk\Controller uses Hawk\Utils
Direct known subclasses
Methods summary
public
|
|
public static
|
|
public static
|
|
public
mixed
|
|
public
|
|
public
|
#
addCssInline( string $style )
Add inline CSS at the end of the HTML result to return to the client |
public
|
#
addJavaScript( string $url )
Add a script tag at the end of the HTML result to return to the client |
public
|
#
addJavaScriptInline( string $script )
Add inline JavaScript code at the end of the HTML result to return to the client |
public
|
#
addKeysToJavascript( string $keys )
Add language keys to be accessible by Javascript. To add serveral keys, provide one key by argument Example : $this->addKeysToJavascript('plugin.key1', 'plugin2.key2'); |
public
string
|
|
public
string
|
|
public
|
Methods used from Hawk\Utils
Constants summary
string |
BEFORE_ACTION
Constant used in events triggered before a controller method to be executed |
#
'before'
|
string |
AFTER_ACTION
Constant used in events triggered afrer a controller method has been executed |
#
'after'
|
Properties summary
public static
|
$currentInstance
The current used controller. This static property is used to know which is the current controller associated to the current route |
#
null
|
public
string
|
$_plugin
The plugin name the controller is contained in |