diff --git a/administrator/components/com_fields/Helper/FieldsHelper.php b/administrator/components/com_fields/Helper/FieldsHelper.php index 6dde70ebdf902..30173178a9bbe 100644 --- a/administrator/components/com_fields/Helper/FieldsHelper.php +++ b/administrator/components/com_fields/Helper/FieldsHelper.php @@ -13,7 +13,6 @@ use Joomla\CMS\Factory; use Joomla\CMS\Fields\FieldsServiceInterface; -use Joomla\CMS\Filesystem\Path; use Joomla\CMS\Form\Form; use Joomla\CMS\Form\FormHelper; use Joomla\CMS\Language\Multilanguage; @@ -678,56 +677,6 @@ public static function getFieldsPluginId() return $result; } - /** - * Configure the Linkbar. - * - * @param string $context The context the fields are used for - * @param string $vName The view currently active - * - * @return void - * - * @since 3.7.0 - */ - public static function addSubmenu($context, $vName) - { - $parts = self::extract($context); - - if (!$parts) - { - return; - } - - $component = $parts[0]; - - // Avoid nonsense situation. - if ($component == 'com_fields') - { - return; - } - - // Try to find the component helper. - $eName = str_replace('com_', '', $component); - $file = Path::clean(JPATH_ADMINISTRATOR . '/components/' . $component . '/helpers/' . $eName . '.php'); - - if (!file_exists($file)) - { - return; - } - - require_once $file; - - $cName = ucfirst($eName) . 'Helper'; - - if (class_exists($cName) && is_callable(array($cName, 'addSubmenu'))) - { - $lang = Factory::getLanguage(); - $lang->load($component, JPATH_ADMINISTRATOR) - || $lang->load($component, JPATH_ADMINISTRATOR . '/components/' . $component); - - $cName::addSubmenu('fields.' . $vName); - } - } - /** * Loads the fields plugins and returns an array of field types from the plugins. * diff --git a/administrator/components/com_menus/View/Items/HtmlView.php b/administrator/components/com_menus/View/Items/HtmlView.php index 397f6c942f405..399cb6046fb54 100644 --- a/administrator/components/com_menus/View/Items/HtmlView.php +++ b/administrator/components/com_menus/View/Items/HtmlView.php @@ -20,7 +20,6 @@ use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; use Joomla\CMS\Toolbar\Toolbar; use Joomla\CMS\Toolbar\ToolbarHelper; -use Joomla\Component\Menus\Administrator\Helper\MenusHelper; /** * The HTML Menus Menu Items View. @@ -101,12 +100,6 @@ public function display($tpl = null) $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); - // We don't need toolbar in the modal window. - if ($this->getLayout() !== 'modal') - { - MenusHelper::addSubmenu('items'); - } - // Check for errors. if (count($errors = $this->get('Errors'))) { diff --git a/administrator/components/com_menus/View/Menus/HtmlView.php b/administrator/components/com_menus/View/Menus/HtmlView.php index c43d04d7580a7..3a52ba7884a06 100644 --- a/administrator/components/com_menus/View/Menus/HtmlView.php +++ b/administrator/components/com_menus/View/Menus/HtmlView.php @@ -16,7 +16,6 @@ use Joomla\CMS\MVC\View\GenericDataException; use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; use Joomla\CMS\Toolbar\ToolbarHelper; -use Joomla\Component\Menus\Administrator\Helper\MenusHelper; /** * The HTML Menus Menu Menus View. @@ -91,8 +90,6 @@ public function display($tpl = null) $this->activeFilters = $this->get('ActiveFilters'); } - MenusHelper::addSubmenu('menus'); - // Check for errors. if (count($errors = $this->get('Errors'))) { diff --git a/administrator/components/com_newsfeeds/View/Newsfeeds/HtmlView.php b/administrator/components/com_newsfeeds/View/Newsfeeds/HtmlView.php index 7d414f7f00d4e..9dee97fa986d5 100644 --- a/administrator/components/com_newsfeeds/View/Newsfeeds/HtmlView.php +++ b/administrator/components/com_newsfeeds/View/Newsfeeds/HtmlView.php @@ -19,7 +19,6 @@ use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; use Joomla\CMS\Toolbar\Toolbar; use Joomla\CMS\Toolbar\ToolbarHelper; -use Joomla\Component\Newsfeeds\Administrator\Helper\NewsfeedsHelper; /** * View class for a list of newsfeeds. @@ -69,12 +68,6 @@ public function display($tpl = null) $this->filterForm = $this->get('FilterForm'); $this->activeFilters = $this->get('ActiveFilters'); - // Modal layout doesn't need the submenu. - if ($this->getLayout() !== 'modal') - { - NewsfeedsHelper::addSubmenu('newsfeeds'); - } - // Check for errors. if (count($errors = $this->get('Errors'))) { diff --git a/administrator/components/com_privacy/Controller/DisplayController.php b/administrator/components/com_privacy/Controller/DisplayController.php index 73beaa3b9df18..4d0399860a4b3 100644 --- a/administrator/components/com_privacy/Controller/DisplayController.php +++ b/administrator/components/com_privacy/Controller/DisplayController.php @@ -17,7 +17,6 @@ use Joomla\CMS\Response\JsonResponse; use Joomla\CMS\Router\Route; use Joomla\CMS\Session\Session; -use Joomla\Component\Privacy\Administrator\Helper\PrivacyHelper; use Joomla\Component\Privacy\Administrator\Model\RequestsModel; /** @@ -94,9 +93,6 @@ public function display($cachable = false, $urlparams = []) // Push document object into the view. $view->document = $document; - // Load the submenu. - PrivacyHelper::addSubmenu($this->input->get('view', $this->default_view)); - $view->display(); } diff --git a/administrator/components/com_redirect/Controller/DisplayController.php b/administrator/components/com_redirect/Controller/DisplayController.php index 7bccd7acb4dbc..bea9a6a28770b 100644 --- a/administrator/components/com_redirect/Controller/DisplayController.php +++ b/administrator/components/com_redirect/Controller/DisplayController.php @@ -43,9 +43,6 @@ class DisplayController extends BaseController */ public function display($cachable = false, $urlparams = false) { - // Load the submenu. - RedirectHelper::addSubmenu($this->input->get('view', 'links')); - $view = $this->input->get('view', 'links'); $layout = $this->input->get('layout', 'default'); $id = $this->input->getInt('id'); diff --git a/administrator/components/com_redirect/Helper/RedirectHelper.php b/administrator/components/com_redirect/Helper/RedirectHelper.php index f2806a81bfb80..3abddad0778f7 100644 --- a/administrator/components/com_redirect/Helper/RedirectHelper.php +++ b/administrator/components/com_redirect/Helper/RedirectHelper.php @@ -30,20 +30,6 @@ class RedirectHelper */ public static $extension = 'com_redirect'; - /** - * Configure the Linkbar. - * - * @param string $vName The name of the active view. - * - * @return void - * - * @since 1.6 - */ - public static function addSubmenu($vName) - { - // No submenu for this component. - } - /** * Returns an array of standard published state filter options. * diff --git a/administrator/components/com_workflow/Helper/WorkflowHelper.php b/administrator/components/com_workflow/Helper/WorkflowHelper.php index f446dc49ccdb5..67f3c837e2086 100644 --- a/administrator/components/com_workflow/Helper/WorkflowHelper.php +++ b/administrator/components/com_workflow/Helper/WorkflowHelper.php @@ -11,51 +11,13 @@ defined('_JEXEC') or die; -use Joomla\CMS\Factory; -use Joomla\CMS\Filesystem\Path; 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 - * + * Workflows component helper * @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, Path::clean(JPATH_ADMINISTRATOR . '/components/' . $component), null, false, true); - call_user_func([$class, 'addSubmenu'], $vName); - } - } } diff --git a/administrator/components/com_workflow/View/Stages/HtmlView.php b/administrator/components/com_workflow/View/Stages/HtmlView.php index 08d65956b80e5..8658f71eca18e 100644 --- a/administrator/components/com_workflow/View/Stages/HtmlView.php +++ b/administrator/components/com_workflow/View/Stages/HtmlView.php @@ -19,7 +19,6 @@ use Joomla\CMS\Toolbar\Toolbar; use Joomla\CMS\Toolbar\ToolbarHelper; use Joomla\CMS\Workflow\Workflow; -use Joomla\Component\Workflow\Administrator\Helper\WorkflowHelper; /** * Stages view class for the Workflow package. @@ -127,10 +126,6 @@ public function display($tpl = null) $this->workflowID = $this->workflow->id; $this->extension = $this->workflow->extension; - WorkflowHelper::addSubmenu('stages'); - - $this->sidebar = \JHtmlSidebar::render(); - if (!empty($this->stages)) { $extension = Factory::getApplication()->input->getCmd('extension'); diff --git a/administrator/components/com_workflow/View/Transitions/HtmlView.php b/administrator/components/com_workflow/View/Transitions/HtmlView.php index d6aab6003f884..8abca349b911d 100644 --- a/administrator/components/com_workflow/View/Transitions/HtmlView.php +++ b/administrator/components/com_workflow/View/Transitions/HtmlView.php @@ -18,7 +18,6 @@ use Joomla\CMS\Router\Route; use Joomla\CMS\Toolbar\Toolbar; use Joomla\CMS\Toolbar\ToolbarHelper; -use Joomla\Component\Workflow\Administrator\Helper\WorkflowHelper; /** * Workflows view class for the Workflow package. @@ -126,10 +125,6 @@ public function display($tpl = null) $this->workflowID = $this->workflow->id; $this->extension = $this->workflow->extension; - WorkflowHelper::addSubmenu('transitions'); - - $this->sidebar = \JHtmlSidebar::render(); - $this->addToolbar(); return parent::display($tpl); diff --git a/administrator/components/com_workflow/View/Workflows/HtmlView.php b/administrator/components/com_workflow/View/Workflows/HtmlView.php index 5a61c68da9203..13a1b7c316fe4 100644 --- a/administrator/components/com_workflow/View/Workflows/HtmlView.php +++ b/administrator/components/com_workflow/View/Workflows/HtmlView.php @@ -16,7 +16,6 @@ use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView; use Joomla\CMS\Toolbar\Toolbar; use Joomla\CMS\Toolbar\ToolbarHelper; -use Joomla\Component\Workflow\Administrator\Helper\WorkflowHelper; /** * Workflows view class for the Workflow package. @@ -106,9 +105,6 @@ public function display($tpl = null) $this->extension = $this->state->get('filter.extension'); - WorkflowHelper::addSubmenu($this->state->get('filter.extension')); - $this->sidebar = \JHtmlSidebar::render(); - $this->addToolbar(); return parent::display($tpl);