Difference between #4 and #8 of
Use shortcut functions to reduce typing

Changes

Title unchanged

Use shortcut functions to reduce typing

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

Content changed

[...]
/**
* This is the shortcut to Yii::app()->clientScript
*/
function cs()
{
// You could also call the client script instance via Yii::app()->clientScript
 
// But this is faster
 
return Yii::app()->getClientScript();
}
[...]
static $baseUrl;
if ($baseUrl===null)
$baseUrl=Yii::app()->
rgetRequest->b()->getBaseUrl();
return $url===null ? $baseUrl : $baseUrl.'/'.ltrim($url,'/');
}
[...]
}
```

 
### Links
 
 
- [Russian Version](http://dbhelp.ru/global-yii-functions/page/)
46 0
45 followers
Viewed: 66 908 times
Version: 1.1
Category: Tutorials
Tags:
Written by: qiang
Last updated by: Yang He
Created on: May 8, 2009
Last updated: 11 years ago
Update Article

Revisions

View all history