AssetManager::adjustScriptMapping PHP Method

adjustScriptMapping() public method

If a Yii widget is being used in an Ajax request, all dependent scripts and stylesheets will be outputted in the response. This method ensures the core scripts and stylesheets are not outputted in an Ajax response.
public adjustScriptMapping ( )
    public function adjustScriptMapping()
    {
        if ($this->isAjaxRequest) {
            $scriptMap = array_merge($this->clientScript->scriptMap, self::$scriptMapping);
            $this->clientScript->scriptMap = $scriptMap;
        }
    }