32
1
mirror of https://github.com/joomla-extensions/weblinks.git synced 2024-12-26 01:57:30 +00:00

Add back icon and route class for backward compatible purpose

This commit is contained in:
Tuan Pham Ngoc 2021-06-20 21:42:26 +07:00
parent 7b12f1c360
commit 23650d0891
2 changed files with 77 additions and 0 deletions

View File

@ -0,0 +1,55 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_weblinks
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
/**
* Weblink Component HTML Helper.
*
* @since 1.5
*/
class JHtmlIcon
{
/**
* Create a link to create a new weblink
*
* @param mixed $weblink Unused
* @param mixed $params Unused
*
* @return string
*/
public static function create($category, $params)
{
return self::getIcon()->create($category, $params);
}
/**
* Create a link to edit an existing weblink
*
* @param object $weblink Weblink data
* @param \Joomla\Registry\Registry $params Item params
* @param array $attribs Unused
*
* @return string
*/
public static function edit($weblink, $params, $attribs = array())
{
return self::getIcon()->edit($weblink, $params, $attribs);
}
/**
* Creates an icon instance.
*
* @return \Joomla\Component\Weblinks\Administrator\Service\HTML\Icon
*/
private static function getIcon()
{
return (new \Joomla\Component\Weblinks\Administrator\Service\HTML\Icon(Joomla\CMS\Factory::getApplication()));
}
}

View File

@ -0,0 +1,22 @@
<?php
/**
* @package Joomla.Site
* @subpackage com_weblinks
*
* @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
defined('_JEXEC') or die;
use Joomla\Component\Weblinks\Site\Helper\RouteHelper;
/**
* Weblinks Component Route Helper.
*
* @since 1.5
*/
abstract class WeblinksHelperRoute extends RouteHelper
{
}