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
string
Message 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
mixed
Data 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
string
The output to escape.
Response
string
The escaped output.
get
Method to get the value from the data array
get( key, defaultValue = null) :
since |
3.5 |
---|
Arguments
- key
string
Key to search for in the data array- defaultValue
mixed
Default value to return if the key is not set
Response
mixed
Value 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
Registry
Object 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
string
The necessary HTML to display the layout
renderDebugMessages
Render the list of debug messages
renderDebugMessages() :
since |
3.2 |
---|
Response
string
Output 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
string
Key for the data array- value
mixed
Value to assign to the key
Response
self
setData
Set the 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
bool
Enable / 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>|Registry
Array / Registry object with the options to load
Response
BaseLayout
Instance 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>