Source for file helper.php

Documentation is available at helper.php

  1. <?php
  2. /**
  3.  * @package     FrameworkOnFramework
  4.  * @subpackage  layout
  5.  * @copyright   Copyright (C) 2010 - 2012 Akeeba Ltd. All rights reserved.
  6.  * @license     GNU General Public License version 2 or later; see LICENSE.txt
  7.  */
  8. // Protect from unauthorized access
  9. defined('_JEXEC'or die;
  10.  
  11. /**
  12.  * Helper to render a FOFLayout object, storing a base path
  13.  *
  14.  * @package  FrameworkOnFramework
  15.  * @since    x.y
  16.  */
  17. {
  18.     /**
  19.      * Method to render the layout.
  20.      *
  21.      * @param   string  $layoutFile   Dot separated path to the layout file, relative to base path
  22.      * @param   object  $displayData  Object which properties are used inside the layout file to build displayed output
  23.      * @param   string  $basePath     Base path to use when loading layout files
  24.      *
  25.      * @return  string 
  26.      */
  27.     public static function render($layoutFile$displayData null$basePath '')
  28.     {
  29.         $basePath empty($basePathself::$defaultBasePath $basePath;
  30.  
  31.         // Make sure we send null to FOFLayoutFile if no path set
  32.         $basePath empty($basePathnull $basePath;
  33.         $layout new FOFLayoutFile($layoutFile$basePath);
  34.         $renderedLayout $layout->render($displayData);
  35.  
  36.         return $renderedLayout;
  37.     }
  38. }

Documentation generated on Tue, 19 Nov 2013 15:04:29 +0100 by phpDocumentor 1.4.3