[ Index ]

PHP Cross Reference of Joomla 4.2.2 documentation

title

Body

[close]

/libraries/src/Layout/ -> FileLayout.php (summary)

Joomla! Content Management System

Copyright: (C) 2012 Open Source Matters, Inc.
License: GNU General Public License version 2 or later; see LICENSE.txt
File Size: 620 lines (16 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

FileLayout:: (21 methods):
  __construct()
  render()
  getPath()
  addIncludePath()
  addIncludePaths()
  clearIncludePaths()
  getIncludePaths()
  getLayoutId()
  getSuffixes()
  loadLanguageSuffixes()
  loadVersionSuffixes()
  removeIncludePath()
  removeIncludePaths()
  validComponent()
  setComponent()
  setClient()
  setLayoutId()
  getDefaultIncludePaths()
  setIncludePaths()
  setSuffixes()
  sublayout()


Class: FileLayout  - X-Ref

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

__construct($layoutId, $basePath = null, $options = null)   X-Ref
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]

render($displayData = array()   X-Ref
Method to render the layout.

param: array  $displayData  Array of properties available for use inside the layout file to build the displayed output
return: string  The necessary HTML to display the layout

getPath()   X-Ref
Method to finds the full real file path, checking possible overrides

return: string  The full path to the layout file

addIncludePath($path)   X-Ref
Add one path to include in layout search. Proxy of addIncludePaths()

param: string|string[]  $path  The path to search for layouts
return: self

addIncludePaths($paths)   X-Ref
Add one or more paths to include in layout search

param: string|string[]  $paths  The path or array of paths to search for layouts
return: self

clearIncludePaths()   X-Ref
Clear the include paths

return: self

getIncludePaths()   X-Ref
Get the active include paths

return: array

getLayoutId()   X-Ref
Get the active layout id

return: string

getSuffixes()   X-Ref
Get the active suffixes

return: array

loadLanguageSuffixes()   X-Ref
Load the automatically generated language suffixes.
Example: array('es-ES', 'es', 'ltr')

return: self

loadVersionSuffixes()   X-Ref
Load the automatically generated version suffixes.
Example: array('j311', 'j31', 'j3')

return: self

removeIncludePath($path)   X-Ref
Remove one path from the layout search

param: string  $path  The path to remove from the layout search
return: self

removeIncludePaths($paths)   X-Ref
Remove one or more paths to exclude in layout search

param: string  $paths  The path or array of paths to remove for the layout search
return: self

validComponent($option = null)   X-Ref
Validate that the active component is valid

param: string  $option  URL Option of the component. Example: com_content
return: boolean

setComponent($option)   X-Ref
Method to change the component where search for layouts

param: string  $option  URL Option of the component. Example: com_content
return: mixed  Component option string | null for none

setClient($client)   X-Ref
Function to initialise the application client

param: mixed  $client  Frontend: 'site' or 0 | Backend: 'admin' or 1
return: void

setLayoutId($layoutId)   X-Ref
Set the active layout id

param: string  $layoutId  Layout identifier
return: self

getDefaultIncludePaths()   X-Ref
Get the default array of include paths

return: array

setIncludePaths($paths)   X-Ref
Set the include paths to search for layouts

param: array  $paths  Array with paths to search in
return: self

setSuffixes(array $suffixes)   X-Ref
Set suffixes to search layouts

param: mixed  $suffixes  String with a single suffix or 'auto' | 'none' or array of suffixes
return: self

sublayout($layoutId, $displayData)   X-Ref
Render a layout with the same include paths & options

param: string  $layoutId     The identifier for the sublayout to be searched in a subfolder with the name of the current layout
param: mixed   $displayData  Data to be rendered
return: string  The necessary HTML to display the layout



Generated: Wed Sep 7 05:41:13 2022 Chilli.vc Blog - For Webmaster,Blog-Writer,System Admin and Domainer