Class JLayoutFile

Description

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

Located in /libraries/cms/layout/file.php (line 21)

JLayoutBase
   |
   --JLayoutFile
Direct descendents
Class Description
 class FOFLayoutFile Base class for rendering a display layout loaded from from a layout file
Variable Summary
 string $basePath
 string $fullPath
 string $layoutId
Method Summary
 JLayoutFile __construct (string $layoutId, [string $basePath = null], [mixed $options = null])
 void addIncludePath (string $path)
 void addIncludePaths (string $paths)
 string getPath ()
 void removeIncludePath (string $path)
 void removeIncludePaths (string $paths)
 string render (object $displayData)
 void setClient (mixed $client)
 mixed setComponent (string $option)
 void setDebug (boolean $debug)
 void setLayout (string $layoutId)
 string sublayout (object $layoutId, mixed $displayData)
 boolean validComponent ([string $option = null])
Variables
string $basePath = null (line 33)
  • var: Base path to use when loading layout files
  • since: 3.0
  • access: protected
string $fullPath = null (line 39)
  • var: Full path to actual layout files, after possible template override check
  • since: 3.0.3
  • access: protected
array $includePaths = array() (line 47)

Paths to search for layouts

  • since: 3.2
  • access: protected
string $layoutId = '' (line 27)
  • var: Dot separated path to the layout file, relative to base path
  • since: 3.0
  • access: protected

Inherited Variables

Inherited from JLayoutBase

JLayoutBase::$debugMessages
JLayoutBase::$options
Methods
Constructor __construct (line 58)

Method to instantiate the file-based layout.

  • since: 3.0
  • access: public
JLayoutFile __construct (string $layoutId, [string $basePath = null], [mixed $options = null])
  • 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. JRegistry or array format [@since 3.2]
addIncludePath (line 170)

Add one path to include in layout search. Proxy of addIncludePaths()

  • since: 3.2
  • access: public
void addIncludePath (string $path)
  • string $path: The path to search for layouts
addIncludePaths (line 184)

Add one or more paths to include in layout search

  • since: 3.2
  • access: public
void addIncludePaths (string $paths)
  • string $paths: The path or array of paths to search for layouts
getPath (line 112)

Method to finds the full real file path, checking possible overrides

  • return: The full path to the layout file
  • since: 3.0
  • access: protected
string getPath ()

Redefined in descendants as:
refreshIncludePaths (line 361)

Refresh the list of include paths

  • since: 3.2
  • access: protected
void refreshIncludePaths ()
removeIncludePath (line 208)

Remove one path from the layout search

  • since: 3.2
  • access: public
void removeIncludePath (string $path)
  • string $path: The path to remove from the layout search
removeIncludePaths (line 222)

Remove one or more paths to exclude in layout search

  • since: 3.2
  • access: public
void removeIncludePaths (string $paths)
  • string $paths: The path or array of paths to remove for the layout search
render (line 81)

Method to render the layout.

  • return: The necessary HTML to display the layout
  • since: 3.0
  • access: public
string render (object $displayData)
  • object $displayData: Object which properties are used inside the layout file to build displayed output

Redefinition of:
JLayoutBase::render()
Method to render the layout.
setClient (line 313)

Function to initialise the application client

  • since: 3.2
  • access: public
void setClient (mixed $client)
  • mixed $client: Frontend: 'site' or 0 | Backend: 'admin' or 1
setComponent (line 268)

Method to change the component where search for layouts

  • return: Component option string | null for none
  • since: 3.2
  • access: public
mixed setComponent (string $option)
  • string $option: URL Option of the component. Example: com_content
setDebug (line 407)

Change the debug mode

  • since: 3.2
  • access: public
void setDebug (boolean $debug)
  • boolean $debug: Enable / Disable debug
setLayout (line 348)

Change the layout

  • since: 3.2
  • access: public
void setLayout (string $layoutId)
  • string $layoutId: Layout to render
sublayout (line 422)

Render a layout with the same include paths & options

  • return: The necessary HTML to display the layout
  • since: 3.2
  • access: public
string sublayout (object $layoutId, mixed $displayData)
  • object $layoutId: Object which properties are used inside the layout file to build displayed output
  • mixed $displayData: Data to be rendered
validComponent (line 241)

Validate that the active component is valid

  • since: 3.2
  • access: protected
boolean validComponent ([string $option = null])
  • string $option: URL Option of the component. Example: com_content

Inherited Methods

Inherited From JLayoutBase

 JLayoutBase::addDebugMessage()
 JLayoutBase::escape()
 JLayoutBase::getDebugMessages()
 JLayoutBase::getOptions()
 JLayoutBase::render()
 JLayoutBase::renderDebugMessages()
 JLayoutBase::resetOptions()
 JLayoutBase::setOptions()

Documentation generated on Tue, 19 Nov 2013 15:03:07 +0100 by phpDocumentor 1.4.3