- md5
- 4a3149294be42e28c228ceffa3fbd148
- sha1
- 7458ef25409bd9db8182e93a0ef1c32e4003d43a
- sha256
- 84be82c916631d9824ad5d11b24fb28a8675db89e0854bcffa2595403b457598
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
<?php
/**
* @package Joomla.Administrator
* @subpackage com_workflow
*
* @copyright Copyright (C) 2005 - 2018 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
namespace Joomla\Component\Workflow\Administrator\Helper;
defined('_JEXEC') or die;
use Joomla\CMS\Factory;
use Joomla\CMS\Helper\ContentHelper;
/**
* The first example class, this is in the same
* package as declared at the start of file but
* this example has a defined subpackage
*
* @since 4.0.0
*/
class WorkflowHelper extends ContentHelper
{
/**
* Configure the Linkbar. Must be implemented by each extension.
*
* @param string $vName The name of the active view.
*
* @return void
*
* @since 3.1
*/
public static function addSubmenu($vName)
{
$extension = Factory::getApplication()->input->getCmd('extension');
$parts = explode('.', $extension);
$component = reset($parts);
$eName = ucfirst(str_replace('com_', '', $component));
$cName = $eName . 'Helper';
$class = '\\Joomla\\Component\\' . $eName . '\\Administrator\\Helper\\' . $cName;
if (class_exists($class) && is_callable([$class, 'addSubmenu']))
{
$lang = Factory::getLanguage();
// Loading language file from the administrator/language directory then
// loading language file from the administrator/components/*extension*/language directory
$lang->load($component, JPATH_BASE, null, false, true)
|| $lang->load($component, \JPath::clean(JPATH_ADMINISTRATOR . '/components/' . $component), null, false, true);
call_user_func([$class, 'addSubmenu'], $vName);
}
}
}
The same content is in 2 releases, Joomla 4.0.0-alpha5 to 4.0.0-alpha6. See them all, or every version of this file.