BaseLayout
Implements LayoutInterfaceBase class for rendering a display layout
| link | |
|---|---|
| since |
3.0 |
| package |
Joomla CMS |
Methods
addDebugMessage
Add a debug message to the debug messages array
addDebugMessage( message) :
| since |
3.2 |
|---|
Arguments
- message
stringMessage to save
Response
self
clearDebugMessages
Clear the debug messages array
clearDebugMessages() :
| since |
3.5 |
|---|
Response
self
debug
Render a layout with debug info
debug( data = []) :
| since |
3.5 |
|---|
Arguments
- data
mixedData passed to the layout
Response
string
escape
Method to escape output.
escape( output) :
| note |
the ENT_COMPAT flag was replaced by ENT_QUOTES in Joomla 4.0 to also escape single quotes |
|---|---|
| since |
3.0 |
Arguments
- output
stringThe output to escape.
Response
stringThe escaped output.
get
Method to get the value from the data array
get( key, defaultValue = null) :
| since |
3.5 |
|---|
Arguments
- key
stringKey to search for in the data array- defaultValue
mixedDefault value to return if the key is not set
Response
mixedValue from the data array | defaultValue if doesn't exist
getData
Get the data being rendered
getData() : mixed||string|int
| since |
3.5 |
|---|
Response
array<string|int, mixed>
getDebugMessages
Get the debug messages array
getDebugMessages() : mixed||string|int
| since |
3.2 |
|---|
Response
array<string|int, mixed>
getOptions
Get the options
getOptions() : \Joomla\Registry\Registry
| since |
3.2 |
|---|
Response
RegistryObject with the options
isDebugEnabled
Check if debug mode is enabled
isDebugEnabled() :
| since |
3.5 |
|---|
Response
bool
render
Method to render the layout.
render(mixed||string|int displayData) :
| since |
3.0 |
|---|
Arguments
- displayData
array<string|int, mixed>Array of properties available for use inside the layout file to build the displayed output
Response
stringThe necessary HTML to display the layout
renderDebugMessages
Render the list of debug messages
renderDebugMessages() :
| since |
3.2 |
|---|
Response
stringOutput text/HTML code
resetOptions
Function to empty all the options
resetOptions() : \Joomla\CMS\Layout\BaseLayout
set
Method to set a value in the data array. Example: $layout->set('items', $items);
set( key, value) :
| since |
3.5 |
|---|
Arguments
- key
stringKey for the data array- value
mixedValue to assign to the key
Response
self
setData
Set the data passed the layout
setData(mixed||string|int data) :
| since |
3.5 |
|---|
Arguments
- data
array<string|int, mixed>Array with the data for the layout
Response
self
setDebug
Change the debug mode
setDebug( debug) :
| since |
3.5 |
|---|
Arguments
- debug
boolEnable / Disable debug
Response
self
setOptions
Set the options
setOptions(array|\Joomla\Registry\Registry options = null) : \Joomla\CMS\Layout\BaseLayout
| since |
3.2 |
|---|
Arguments
- options
array<string|int, mixed>|RegistryArray / Registry object with the options to load
Response
BaseLayoutInstance of $this to allow chaining.
Properties
options
Options object
| since |
3.2 |
|---|
Type(s)
Registry
data
Data for the layout
| since |
3.5 |
|---|
Type(s)
array<string|int, mixed>
debugMessages
Debug information messages
| since |
3.2 |
|---|
Type(s)
array<string|int, mixed>