- md5
- b16cefeea466a49637d8ab7ec8af6fcf
- sha1
- b3b78245058187e752a2609f3d78a7d97d088b0a
- sha256
- 167bde4d5a6c9fe177ffbcde91c5637975d6b054252239e6eff128a87dab551e
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
<?php
/**
* @package Joomla.Site
* @subpackage mod_wrapper
*
* @copyright (C) 2006 Open Source Matters, Inc. <https://www.joomla.org>
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Module\Wrapper\Site\Helper;
use Joomla\CMS\Factory;
/**
* Helper for mod_wrapper
*
* @since 1.5
*/
class WrapperHelper
{
/**
* Gets the parameters for the wrapper
*
* @param mixed &$params The parameters set in the administrator section
*
* @return mixed &$params The modified parameters
*
* @since 1.5
*/
public static function getParams(&$params)
{
$params->def('url', '');
$params->def('scrolling', 'auto');
$params->def('height', '200');
$params->def('height_auto', 0);
$params->def('width', '100%');
$params->def('add', 1);
$params->def('name', 'wrapper');
$url = $params->get('url');
if ($params->get('add')) {
// Adds 'http://' if none is set
if (strpos($url, '/') === 0) {
// Relative URL in component. use server http_host.
$url = 'http://' . Factory::getApplication()->input->server->get('HTTP_HOST') . $url;
} elseif (strpos($url, 'http') === false && strpos($url, 'https') === false) {
$url = 'http://' . $url;
}
}
$load = '';
// Auto height control
if ($params->def('height_auto')) {
$load = 'onload="iFrameHeight(this)"';
}
$params->set('load', $load);
$params->set('url', $url);
return $params;
}
}
The same content is in 5 releases, Joomla 4.2.0-beta3 to 4.2.1-rc2. See them all, or every version of this file.