FOF30\Toolbar\Toolbar::renderSubmenu PHP Метод

renderSubmenu() публичный Метод

Renders the submenu (toolbar links) for all detected views of this component
public renderSubmenu ( ) : void
Результат void
    public function renderSubmenu()
    {
        $views = $this->getMyViews();
        if (empty($views)) {
            return;
        }
        $activeView = $this->container->input->getCmd('view', 'cpanel');
        foreach ($views as $view) {
            // Get the view name
            $key = strtoupper($this->container->componentName) . '_TITLE_' . strtoupper($view);
            //Do we have a translation for this key?
            if (strtoupper(JText::_($key)) == $key) {
                $altview = $this->container->inflector->isPlural($view) ? $this->container->inflector->singularize($view) : $this->container->inflector->pluralize($view);
                $key2 = strtoupper($this->container->componentName) . '_TITLE_' . strtoupper($altview);
                // Maybe we have for the alternative view?
                if (strtoupper(JText::_($key2)) == $key2) {
                    // Nope, let's use the raw name
                    $name = ucfirst($view);
                } else {
                    $name = JText::_($key2);
                }
            } else {
                $name = JText::_($key);
            }
            $link = 'index.php?option=' . $this->container->componentName . '&view=' . $view;
            $active = $view == $activeView;
            $this->appendLink($name, $link, $active);
        }
    }