private function generateUrl($url)
    {
        if ($this->packages) {
            return $this->packages->getUrl($url);
        }

        if ($this->coreAssetsHelper) {
            // To remove when compatibility with Symfony 2.7 is dropped
            return $this->coreAssetsHelper->getUrl($url);
        }

        return $url;
    }
private function generateUrl($url)
    {
        if ($this->packages) {
            return $this->packages->getUrl($url);
        }

        if ($this->coreAssetsHelper) {
            // To remove when compatibility with Symfony 2.7 is dropped
            return $this->coreAssetsHelper->getUrl($url);
        }

        return $url;
    }
private function generateUrl ( $ url ) { if ( $ this -> packages ) { return $ this -> packages -> getUrl ( $ url ) ; } if ( $ this -> coreAssetsHelper ) { // To remove when compatibility with Symfony 2.7 is dropped return $ this -> coreAssetsHelper -> getUrl ( $ url ) ; } return $ url ; }
Generate an url in both Symfony 2 and Symfony 3+ compatible ways.

@param string $url

@return string
Generate an url in both Symfony 2 and Symfony 3 + compatible ways .