public function getUrlFromRouteName(
        $locale, $defaultLocale, $transKey, $attributes = [], $defaultHidden = false, $showHiddenLocale = false
    ) {
        if ( ! is_string($locale))
            $locale = $defaultLocale;

        $url = '';

        if ( ! ($locale === $defaultLocale && $defaultHidden) || $showHiddenLocale)
            $url = '/'.$locale;

        if ($this->hasTranslation($transKey, $locale))
            $url = Url::substituteAttributes($attributes, $url.'/'.$this->trans($transKey, $locale));

        return $url;
    }
public function getUrlFromRouteName(
        $locale, $defaultLocale, $transKey, $attributes = [], $defaultHidden = false, $showHiddenLocale = false
    ) {
        if ( ! is_string($locale))
            $locale = $defaultLocale;

        $url = '';

        if ( ! ($locale === $defaultLocale && $defaultHidden) || $showHiddenLocale)
            $url = '/'.$locale;

        if ($this->hasTranslation($transKey, $locale))
            $url = Url::substituteAttributes($attributes, $url.'/'.$this->trans($transKey, $locale));

        return $url;
    }
public function getUrlFromRouteName ( $ locale , $ defaultLocale , $ transKey , $ attributes = [ ] , $ defaultHidden = false , $ showHiddenLocale = false ) { if ( ! is_string ( $ locale ) ) $ locale = $ defaultLocale ; $ url = '' ; if ( ! ( $ locale === $ defaultLocale && $ defaultHidden ) || $ showHiddenLocale ) $ url = '/' . $ locale ; if ( $ this -> hasTranslation ( $ transKey , $ locale ) ) $ url = Url :: substituteAttributes ( $ attributes , $ url . '/' . $ this -> trans ( $ transKey , $ locale ) ) ; return $ url ; }
Get URL from route name.

@param  string      $locale
@param  string      $defaultLocale
@param  string      $transKey
@param  array       $attributes
@param  bool|false  $defaultHidden
@param  bool|false  $showHiddenLocale

@return string
Get URL from route name .