\GSPPanel\Display
This class control the display and templating system for GSP-Panel
Methods
AddDisplay(string $file) : voidAdds 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) : voidAdds a smarty variable
Parameters
| Name | Type | Description |
|---|---|---|
| $key | string |
|
| $val | string |
|
DisplayFooter( $footer) : voidChanges the option to display the footer
Parameters
Details
| Name | Type | Description |
|---|---|---|
| $footer |
- Access
- private
DisplayHeader( $header) : voidChanges the option to display the header
Parameters
Details
| Name | Type | Description |
|---|---|---|
| $header |
- Access
- private
DisplayType(string $type) : voidChanges 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 = "") : voidDisplays 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\DisplayReturns the instance of the display class
Returns
| Type | Description |
|---|---|
| \GSPPanel\Display |
getSmartyInstance() : \SmartyReturns the instance of the smarty class
Returns
| Type | Description |
|---|---|
| \Smarty |