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(string message) : self
since |
3.2 |
---|
Arguments
- message
string
Message to save
Response
self
clearDebugMessages
Clear the debug messages array
clearDebugMessages() : self
since |
3.5 |
---|
Response
self
debug
Render a layout with debug info
debug(mixed data = array()) : string
since |
3.5 |
---|
Arguments
- data
mixed
Data passed to the layout
Response
string
escape
Method to escape output.
escape(string output) : string
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(string key, mixed defaultValue = null) : mixed
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() : array
since |
3.5 |
---|
Response
array
getDebugMessages
Get the debug messages array
getDebugMessages() : array
since |
3.2 |
---|
Response
array
getOptions
Get the options
getOptions() : \Joomla\Registry\Registry
since |
3.2 |
---|
Response
\Joomla\Registry\Registry
Object with the options
isDebugEnabled
Check if debug mode is enabled
isDebugEnabled() : bool
since |
3.5 |
---|
Response
bool
render
Method to render the layout.
render(array displayData) : string
since |
3.0 |
---|
Arguments
- displayData
array
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() : string
since |
3.2 |
---|
Response
string
Output text/HTML code
resetOptions
Function to empty all the options
resetOptions() : \Joomla\CMS\Layout\BaseLayout
since |
3.2 |
---|
Response
\Joomla\CMS\Layout\BaseLayout
Instance of $this to allow chaining.
set
Method to set a value in the data array. Example: $layout->set('items', $items);
set(string key, mixed value) : self
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(array data) : self
since |
3.5 |
---|
Arguments
- data
array
Array with the data for the layout
Response
self
setDebug
Change the debug mode
setDebug(bool debug) : self
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|\Joomla\Registry\Registry
Array / Registry object with the options to load
Response
\Joomla\CMS\Layout\BaseLayout
Instance of $this to allow chaining.
Properties
options
Options object
since |
3.2 |
---|
Type(s)
\Joomla\Registry\Registry