Back to FileLayout class

Method __construct

public
__construct
(mixed $layoutId, mixed $basePath = null, mixed $options = null)
Method to instantiate the file-based layout.
Parameters
  • string $layoutId Dot separated path to the layout file, relative to base path
  • string $basePath Base path to use when loading layout files
  • mixed $options Optional custom options to load. Registry or array format [@since 3.2]
Since
  • 3.0
Class: FileLayout
Project: Joomla

Method __construct - Source code

/**
 * Method to instantiate the file-based layout.
 *
 * @param   string  $layoutId  Dot separated path to the layout file, relative to base path
 * @param   string  $basePath  Base path to use when loading layout files
 * @param   mixed   $options   Optional custom options to load. Registry or array format [@since 3.2]
 *
 * @since   3.0
 */
public function __construct($layoutId, $basePath = null, $options = null)
{
    // Initialise / Load options
    $this->setOptions($options);
    // Main properties
    $this->setLayoutId($layoutId);
    $this->basePath = $basePath;
    // Init Environment
    $this->setComponent($this->options->get('component', 'auto'));
    $this->setClient($this->options->get('client', 'auto'));
}