Yii Custom Widget

I am trying to create a Yii widget that will generate google charts (http://code.google.com/apis/chart).

How to create a widget that writes code in html headers (where javascript will be included, etc.) and in the html tag?

+4
source share
1 answer

I found my answer:

Yii::app()->clientScript->registerScriptFile() 

and

 Yii::app()->clientScript->registerScript() 
+4
source

Source: https://habr.com/ru/post/1369453/


All Articles