public function addNavigation($name, $label, $url, $active = false)
    {
        if (is_array($url)) {
            $url = http_build_query($url);
        }

        $command = $this->addCommand($name, array(
            'label' => $label,
        ))->getCommand($name)
          ->href($url);

        if ($active) {
            $command->class('active', ' ');
        }

        return $command;
    }
public function addNavigation($name, $label, $url, $active = false)
    {
        if (is_array($url)) {
            $url = http_build_query($url);
        }

        $command = $this->addCommand($name, array(
            'label' => $label,
        ))->getCommand($name)
          ->href($url);

        if ($active) {
            $command->class('active', ' ');
        }

        return $command;
    }
public function addNavigation ( $ name , $ label , $ url , $ active = false ) { if ( is_array ( $ url ) ) { $ url = http_build_query ( $ url ) ; } $ command = $ this -> addCommand ( $ name , array ( 'label' => $ label , ) ) -> getCommand ( $ name ) -> href ( $ url ) ; if ( $ active ) { $ command -> class ( 'active' , ' ' ) ; } return $ command ; }
Adds a command to the menubar. A menubar command must always be used as means to navigation
through different views.

@param string       $name   Command name
@param string       $label  Navigation label
@param string|array $url    Navigation URL
@param bool         $active Boolean to set if a navigation command is active

@return ComBaseControllerToolbarMenubar
Adds a command to the menubar . A menubar command must always be used as means to navigation through different views .