Back to Joomla project (class list)

Class FileLayout - list of methods

Base class for rendering a display layout loaded from from a layout file

Extends

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/FileLayout.php
Project: Joomla

Method Summary

public
(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
Show source code of this method: __construct Source Code

public string
(mixed $displayData = array())

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

protected string
()

Method to finds the full real file path, checking possible overrides
Returns
  • string The full path to the layout file
Since
  • 3.0
Show source code of this method: getPath Source Code

public self
(mixed $path)

Add one path to include in layout search. Proxy of addIncludePaths()
Parameters
  • string|string[] $path The path to search for layouts
Returns
  • self
Since
  • 3.2
Show source code of this method: addIncludePath Source Code

public self
(mixed $paths)

Add one or more paths to include in layout search
Parameters
  • string|string[] $paths The path or array of paths to search for layouts
Returns
  • self
Since
  • 3.2
Show source code of this method: addIncludePaths Source Code

public self
()

Clear the include paths
Returns
  • self
Since
  • 3.5
Show source code of this method: clearIncludePaths Source Code

public array
()

Get the active include paths
Returns
  • array
Since
  • 3.5
Show source code of this method: getIncludePaths Source Code

public string
()

Get the active layout id
Returns
  • string
Since
  • 3.5
Show source code of this method: getLayoutId Source Code

public array
()

Get the active suffixes
Returns
  • array
Since
  • 3.5
Show source code of this method: getSuffixes Source Code

public self
()

Load the automatically generated language suffixes.
Returns
  • self
Since
  • 3.5
Show source code of this method: loadLanguageSuffixes Source Code

public self
()

Load the automatically generated version suffixes.
Returns
  • self
Since
  • 3.5
Show source code of this method: loadVersionSuffixes Source Code

public self
(mixed $path)

Remove one path from the layout search
Parameters
  • string $path The path to remove from the layout search
Returns
  • self
Since
  • 3.2
Show source code of this method: removeIncludePath Source Code

public self
(mixed $paths)

Remove one or more paths to exclude in layout search
Parameters
  • string $paths The path or array of paths to remove for the layout search
Returns
  • self
Since
  • 3.2
Show source code of this method: removeIncludePaths Source Code

protected bool
(mixed $option = null)

Validate that the active component is valid
Parameters
  • string $option URL Option of the component. Example: com_content
Returns
  • bool
Since
  • 3.2
Show source code of this method: validComponent Source Code

public mixed
(mixed $option)

Method to change the component where search for layouts
Parameters
  • string $option URL Option of the component. Example: com_content
Returns
  • mixed Component option string | null for none
Since
  • 3.2
Show source code of this method: setComponent Source Code

public void
(mixed $client)

Function to initialise the application client
Parameters
  • mixed $client Frontend: 'site' or 0 | Backend: 'admin' or 1
Returns
  • void
Since
  • 3.2
Show source code of this method: setClient Source Code

public self
(mixed $layoutId)

Set the active layout id
Parameters
  • string $layoutId Layout identifier
Returns
  • self
Since
  • 3.5
Show source code of this method: setLayoutId Source Code

public array
()

Get the default array of include paths
Returns
  • array
Since
  • 3.5
Show source code of this method: getDefaultIncludePaths Source Code

public self
(mixed $paths)

Set the include paths to search for layouts
Parameters
  • array $paths Array with paths to search in
Returns
  • self
Since
  • 3.5
Show source code of this method: setIncludePaths Source Code

public self
(array $suffixes)

Set suffixes to search layouts
Parameters
  • mixed $suffixes String with a single suffix or 'auto' | 'none' or array of suffixes
Returns
  • self
Since
  • 3.5
Show source code of this method: setSuffixes Source Code

public string
(mixed $layoutId, mixed $displayData)

Render a layout with the same include paths & options
Parameters
  • string $layoutId The identifier for the sublayout to be searched in a subfolder with the name of the current layout
  • mixed $displayData Data to be rendered
Returns
  • string The necessary HTML to display the layout
Since
  • 3.2
Show source code of this method: sublayout Source Code

Properties Summary

protected static array
$cache
Cached layout paths
Since
  • 3.5
protected string
$layoutId
Dot separated path to the layout file, relative to base path
Since
  • 3.0
protected string
$basePath
Base path to use when loading layout files
Since
  • 3.0
protected string
$fullPath
Full path to actual layout files, after possible template override check
Since
  • 3.0.3
protected array
$includePaths
Paths to search for layouts
Since
  • 3.2

Tags Summary

Since
3.0