cr0t
(Kuznecov Sg)
1
I want to write an extension extends a CLogRoute class, but in render I need to use jQuery functions.
How I can register jquery script asset inside an extension?
Yii::app()->clientScript->registerCoreScript('jquery') don't works here.
I don't want to include another instance of jquery.js to my extension coz we have it already from "Yii Box".
mocapapa
(Mocapapa)
2
I included the code in my php file under extension but everything worked fine.
Yii::app()->clientScript->registerCoreScript('jquery');
Though I am not sure what is the difference between mine and yours, one reason might be the dependency…
cr0t
(Kuznecov Sg)
3
Your extension class extends CApplicationComponent?
My extension extends CLogRoute class and I have that error at stage of initizlization of my extension.
Fatal error: Call to a member function recordCachingAction() on a non-object in E:xampphtdocsyiiframeworkwebCClientScript.php on line 279
qiang
(Qiang Xue)
4
Thanks. I just fixed this.