Подсмотрено на просторах сети, после небольших правок стало готово к использованию:
<?php public static function cross_app_link_to($app, $route, $args=null) { /* get the host to build the absolute paths needed because this menu lets switch between sf apps */ $host = sfContext::getInstance()->getRequest()->getHost() ; /* get the current environment. Needed to switch between the apps preserving the environment */ $env = sfConfig::get('sf_environment'); /* get the routing file */ $appRoutingFile = sfConfig::get('sf_root_dir'). DIRECTORY_SEPARATOR.'apps'.DIRECTORY_SEPARATOR. $app.DIRECTORY_SEPARATOR.'config'.DIRECTORY_SEPARATOR. 'routing.yml' ; $routeUrl = ""; if (file_exists($appRoutingFile)) { $yml = sfYaml::load($appRoutingFile) ; $routeUrl = $yml[$route]['url'] ; if ($args) { foreach ($args as $k => $v) { $routeUrl = str_replace(':'.$k, $v, $routeUrl) ; } } if (strrpos($routeUrl, '*') == strlen($routeUrl)-1) { $routeUrl = substr($routeUrl, 0, strlen($routeUrl)-2) ; } } if ($env == 'dev') { $path = 'http://' . $host . '/' . $app . '_dev.php' . '/' . $routeUrl ; } else { $path = 'http://' . $host . '/' . $app . '.php' . '/' . $routeUrl ; } return $path ; } ?>
Можно положить во frontendConfiguration.class.php, или оформить в виде helper’а. После чего просто вызываем:
<?php frontendConfiguration::cross_app_link_to('backend', 'module_name') ?>