problems with clientScript

<?php $js = Yii::app()->getAssetManager()->publish(dirname(FILE))).’/js/’);

echo Yii::app()->clientScript->register($js.‘group.js’);

?>

can you explain why this is not working?

im guessing its wrong to echo right, imean what actually does clientScript->register do? the docs are confusing, do i just call it and it does the magic

<?php

$cs = Yii::app()->getClientScript();

$jsDir = Yii::app()->getAssetManager()->publish(dirname(FILE))).’/js/’);

$cs->registerCoreScript(‘jquery’);

/*** $cs->registerCssFile($jsDir . ‘/myCoolTheme.css’); ***/

$cs->registerScriptFile($jsDir . ‘group.js’);

?>

When you register the file to the clientScript, you’re adding it to the list of things which need to be published within the document. What kind of file you’re registering will determine where it’s placed in the document.

This link might be helpful: http://www.yiiframework.com/doc/api/1.1/CClientScript#registerScriptFile-detail