\GSPPanel\Display
This class control the display and templating system for GSP-Panel
Methods
AddDisplay(string $file) : void
Adds a template file to be displayed
$file:
- The file will be added to an array to be displayed when calling Display.
- The files are displayed in the order they are added
Name | Type | Description |
---|---|---|
$file | string |
AddVariable(string $key, string $val) : void
Adds a smarty variable
Parameters
Name | Type | Description |
---|---|---|
$key | string |
|
$val | string |
|
DisplayFooter( $footer) : void
Changes the option to display the footer
Parameters
Details
Name | Type | Description |
---|---|---|
$footer |
- Access
- private
DisplayHeader( $header) : void
Changes the option to display the header
Parameters
Details
Name | Type | Description |
---|---|---|
$header |
- Access
- private
DisplayType(string $type) : void
Changes the display type
$type: Can be one of the following
- login(Will display header and footer)
- client(Will display header and footer)
- admin(Will display header and footer)
- ajax(Will not display header and footer)
Name | Type | Description |
---|---|---|
$type | string |
Output(string $template = "") : void
Displays the template file specified or the templates from calling AddDisplay This will display any associated headers and footers with the DisplayType specified
Ths template parameter is not required if files are added from AddDisplay
Name | Type | Description |
---|---|---|
$template | string |
getInstance() : \GSPPanel\Display
Returns the instance of the display class
Returns
Type | Description |
---|---|
\GSPPanel\Display |
getSmartyInstance() : \Smarty
Returns the instance of the smarty class
Returns
Type | Description |
---|---|
\Smarty |