Back to Joomla project (class list)

Class BaseLayout - list of methods

Base class for rendering a display layout

Extends

Direct known subclasses

Package: Joomla\CMS\Layout
Copyright: (C) 2012 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
Located at: Joomla/Layout/BaseLayout.php
Project: Joomla

Method Summary

public \Joomla\CMS\Layout\BaseLayout
(mixed $options = null)

Set the options
Parameters
  • array|\Joomla\Registry\Registry $options Array / Registry object with the options to load
Returns
  • \Joomla\CMS\Layout\BaseLayout Instance of $this to allow chaining.
Since
  • 3.2
Show source code of this method: setOptions Source Code

public \Joomla\Registry\Registry
()

Get the options
Returns
  • \Joomla\Registry\Registry Object with the options
Since
  • 3.2
Show source code of this method: getOptions Source Code

public \Joomla\CMS\Layout\BaseLayout
()

Function to empty all the options
Returns
  • \Joomla\CMS\Layout\BaseLayout Instance of $this to allow chaining.
Since
  • 3.2
Show source code of this method: resetOptions Source Code

public string
(mixed $output)

Method to escape output.
Parameters
  • string $output The output to escape.
Returns
  • string The escaped output.
Since
  • 3.0
-
  • the ENT_COMPAT flag was replaced by ENT_QUOTES in Joomla 4.0 to also escape single quotes
Show source code of this method: escape Source Code

public array
()

Get the debug messages array
Returns
  • array
Since
  • 3.2
Show source code of this method: getDebugMessages Source Code

public string
(mixed $displayData)

Method to render the layout.
Parameters
  • array $displayData Array of properties available for use inside the layout file to build the displayed output
Returns
  • string The necessary HTML to display the layout
Since
  • 3.0
Show source code of this method: render Source Code

public string
()

Render the list of debug messages
Returns
  • string Output text/HTML code
Since
  • 3.2
Show source code of this method: renderDebugMessages Source Code

public self
(mixed $message)

Add a debug message to the debug messages array
Parameters
  • string $message Message to save
Returns
  • self
Since
  • 3.2
Show source code of this method: addDebugMessage Source Code

public self
()

Clear the debug messages array
Returns
  • self
Since
  • 3.5
Show source code of this method: clearDebugMessages Source Code

public string
(mixed $data = array())

Render a layout with debug info
Parameters
  • mixed $data Data passed to the layout
Returns
  • string
Since
  • 3.5
Show source code of this method: debug Source Code

public mixed
(mixed $key, mixed $defaultValue = null)

Method to get the value from the data array
Parameters
  • string $key Key to search for in the data array
  • mixed $defaultValue Default value to return if the key is not set
Returns
  • mixed Value from the data array | defaultValue if doesn't exist
Since
  • 3.5
Show source code of this method: get Source Code

public array
()

Get the data being rendered
Returns
  • array
Since
  • 3.5
Show source code of this method: getData Source Code

public bool
()

Check if debug mode is enabled
Returns
  • bool
Since
  • 3.5
Show source code of this method: isDebugEnabled Source Code

public self
(mixed $key, mixed $value)

Method to set a value in the data array. Example: $layout->set('items', $items);
Parameters
  • string $key Key for the data array
  • mixed $value Value to assign to the key
Returns
  • self
Since
  • 3.5
Show source code of this method: set Source Code

public self
(array $data)

Set the the data passed the layout
Parameters
  • array $data Array with the data for the layout
Returns
  • self
Since
  • 3.5
Show source code of this method: setData Source Code

public self
(mixed $debug)

Change the debug mode
Parameters
  • bool $debug Enable / Disable debug
Returns
  • self
Since
  • 3.5
Show source code of this method: setDebug Source Code

Properties Summary

protected \Joomla\Registry\Registry
$options
Options object
Since
  • 3.2
protected array
$data
Data for the layout
Since
  • 3.5
protected array
$debugMessages
Debug information messages
Since
  • 3.2

Tags Summary

Since
3.0