/contentmanager/code/trunk/administrator/components/com_contentmanager/libraries/jxtended/form/html/decorators/url.php
PHP | 31 lines | 12 code | 2 blank | 17 comment | 1 complexity | 1ba6fe998ecd0b52f7f346a80eb36e8b MD5 | raw file
- <?php
- /**
- * @version $Id: url.php 160 2009-07-09 00:06:09Z eddieajau $
- * @package JXtended.Libraries
- * @subpackage Form
- * @copyright Copyright (C) 2008 - 2009 JXtended, LLC. All rights reserved.
- * @license GNU General Public License <http://www.gnu.org/copyleft/gpl.html>
- * @link http://jxtended.com
- */
- defined('JPATH_BASE') or die;
- /**
- * Decorates a URL link
- *
- * If the http prefix is not supplied, one will be added
- *
- * @static
- * @package JXtended.Libraries
- * @subpackage Forms
- */
- class JXDecoratorUrl
- {
- function render($value, $text = '', $options = null)
- {
- if (strpos($value, 'http') !== 0) {
- $value = 'http://'.$value;
- }
- return JHTML::link($value, ($text ? $text : $value), $options);
- }
- }