src/View/Helper/MenuHelper.php
protected function _createDefaultVoters($type)
    {
        switch ($type) {
            case static::MATCH_FUZZY_ROUTE:
                return [
                    new FuzzyRouteVoter($this->getView()->getRequest())
                ];
            case static::MATCH_URL:
                return [
                    new UrlVoter($this->getView()->getRequest())
                ];
            case static::MATCH_URL_WITH_QUERY_STRING:
                return [
                    new UrlVoter($this->getView()->getRequest(), [
                        'ignoreQueryString' => false
                    ])
                ];
        }

        return false;
    }
protected function _createDefaultVoters($type)
    {
        switch ($type) {
            case static::MATCH_FUZZY_ROUTE:
                return [
                    new FuzzyRouteVoter($this->getView()->getRequest())
                ];
            case static::MATCH_URL:
                return [
                    new UrlVoter($this->getView()->getRequest())
                ];
            case static::MATCH_URL_WITH_QUERY_STRING:
                return [
                    new UrlVoter($this->getView()->getRequest(), [
                        'ignoreQueryString' => false
                    ])
                ];
        }

        return false;
    }
protected function _createDefaultVoters ( $ type ) { switch ( $ type ) { case static :: MATCH_FUZZY_ROUTE : return [ new FuzzyRouteVoter ( $ this -> getView ( ) -> getRequest ( ) ) ] ; case static :: MATCH_URL : return [ new UrlVoter ( $ this -> getView ( ) -> getRequest ( ) ) ] ; case static :: MATCH_URL_WITH_QUERY_STRING : return [ new UrlVoter ( $ this -> getView ( ) -> getRequest ( ) , [ 'ignoreQueryString' => false ] ) ] ; } return false ; }
Creates default voters for the given type.

@param string $type The type of the voters to create.
@return VoterInterface[]|bool An array holding the created voters, or `false` for unsupported
types.
Creates default voters for the given type .