This class searches for Joomla! version override Layouts. For example, if you have run this under Joomla! 3.0 and you try to load mylayout.default it will automatically search for the layout files default.j30.php, default.j3.php and default.php, in this order.
Наследование: extends JLayoutFil\JLayoutFile
Пример #1
0
 /**
  * Method to render the layout.
  *
  * @param   Container  $container    The container of your component
  * @param   string     $layoutFile   Dot separated path to the layout file, relative to base path
  * @param   object     $displayData  Object which properties are used inside the layout file to build displayed output
  * @param   string     $basePath     Base path to use when loading layout files
  *
  * @return  string
  */
 public static function render(Container $container, $layoutFile, $displayData = null, $basePath = '')
 {
     $basePath = empty($basePath) ? self::$defaultBasePath : $basePath;
     // Make sure we send null to LayoutFile if no path set
     $basePath = empty($basePath) ? null : $basePath;
     $layout = new LayoutFile($layoutFile, $basePath);
     $layout->container = $container;
     $renderedLayout = $layout->render($displayData);
     return $renderedLayout;
 }