示例#1
0
文件: aHelper.php 项目: hashir/UoA
function _a_required_assets()
{
    $response = sfContext::getInstance()->getResponse();
    $user = sfContext::getInstance()->getUser();
    sfContext::getInstance()->getConfiguration()->loadHelpers(array('Url', 'I18N'));
    // Do not load redundant CSS and JS in an AJAX context.
    // These are already loaded on the page in which the AJAX action
    // is operating. Please don't change this as it breaks or at least
    // greatly slows updates
    if (sfContext::getInstance()->getRequest()->isXmlHttpRequest()) {
        return;
    }
    aTools::addStylesheetsIfDesired();
    aTools::addJavascriptsIfDesired();
}