protected function _calculateRedirection(EntityInterface $content)
    {
        foreach (['translation', 'parent'] as $method) {
            if ($has = $content->{$method}()) {
                return option('url_locale_prefix') ? '/' . $has->get('language') . stripLanguagePrefix($has->get('url')) : $has->get('url');
            }
        }

        return '';
    }
protected function _calculateRedirection(EntityInterface $content)
    {
        foreach (['translation', 'parent'] as $method) {
            if ($has = $content->{$method}()) {
                return option('url_locale_prefix') ? '/' . $has->get('language') . stripLanguagePrefix($has->get('url')) : $has->get('url');
            }
        }

        return '';
    }
protected function _calculateRedirection ( EntityInterface $ content ) { foreach ( [ 'translation' , 'parent' ] as $ method ) { if ( $ has = $ content -> { $ method } ( ) ) { return option ( 'url_locale_prefix' ) ? '/' . $ has -> get ( 'language' ) . stripLanguagePrefix ( $ has -> get ( 'url' ) ) : $ has -> get ( 'url' ) ; } } return '' ; }
Calculates the URL to which visitor should be redirected according to
content's & visitor's language.

@param \Cake\Datasource\EntityInterface $content Content to inspect
@return string Redirection URL, empty on error
Calculates the URL to which visitor should be redirected according to content s & visitor s language .