| Server IP : 54.36.91.62 / Your IP : 216.73.217.94 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/c/o/o/coopiak/www/cj79373/libraries/fof40/Layout/ |
Upload File : |
<?php
/**
* @package FOF
* @copyright Copyright (c)2010-2022 Nicholas K. Dionysopoulos / Akeeba Ltd
* @license GNU General Public License version 3, or later
*/
namespace FOF40\Layout;
defined('_JEXEC') || die;
use FOF40\Container\Container;
class LayoutHelper
{
/**
* A default base path that will be used if none is provided when calling the render method.
* Note that FileLayout itself will default to JPATH_ROOT . '/layouts' if no basePath is supplied at all
*
* @var string
*/
public static $defaultBasePath = '';
/**
* 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 array $displayData Array with values to be 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, string $layoutFile, array $displayData = [], string $basePath = ''): string
{
$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;
return $layout->render($displayData);
}
}