tonydspaniard / Yii-extensions

My small contribution to the Yii framework community
124 stars 50 forks source link

Can't chain registerScript() with itself #16

Closed Vijar closed 11 years ago

Vijar commented 11 years ago

CClientScript allows something like this

$script_a = "YOUR SCRIPT A HERE";
$script_b = "YOUR SCRIPT B HERE";
Yii::app()->clientScript->registerScript('a', $script_a)->registerScript('b', $script_b);

With EClientScriptBoost you can only do:

$script_a = "YOUR SCRIPT A HERE";
$script_b = "YOUR SCRIPT B HERE";
Yii::app()->clientScript->registerScript('a', $script_a)
Yii::app()->clientScript->registerScript('b', $script_b);

Not a huge deal but took an hour to track down the bug. The error message it shows is misleading and caused me to think I was importing the extension wrong.

This should only be a few lines of code to fix I think. Just need to make EClientScriptBoost->registerScript() return the parent functions return value.