Get List Of Registered Script


I am developing an AJAX action tha requires few javascript and css files

For that I use



after of the request the specifics js and css files are loaded

also main js (like jquery.js)

but In main action I have already loaded the main javascript files

Αs consequence the main functionality of current action (no Ajax) not working,

so I want to get a list of javascript that created by all invocations of Yii::app()->getClientScript()->registerScriptFile and outputs by myself (as $this->processOutput() does)

How can I do that?


Have you tried a search from the command line?

find . -name *.php | xargs grep registerScript


Thanks but I think this is a trick way (maybe slowdown the speed of the site foreach request)

Another way in Yii ?

I don’t think a solution like this exists now.

The method using a shell command took less than a second when I tested it with my code. I think than you would only need to run this script one time. The shell script reports all occurances of the string ‘registerScript’ in all source code, including extension files, comments, and “dead” code that never gets executed.