Back to BaseLayout class

Method setOptions

public \Joomla\CMS\Layout\BaseLayout
setOptions
(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
Class: BaseLayout
Project: Joomla

Method setOptions - Source code

/**
 * Set the options
 *
 * @param   array|Registry  $options  Array / Registry object with the options to load
 *
 * @return  BaseLayout  Instance of $this to allow chaining.
 *
 * @since   3.2
 */
public function setOptions($options = null)
{
    // Received Registry
    if ($options instanceof Registry) {
        $this->options = $options;
    } elseif (\is_array($options)) {
        $this->options = new Registry($options);
    } else {
        $this->options = new Registry();
    }
    return $this;
}