Changes
Title
unchanged
Extension Development (beginner)
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
extensions, extension-development, performance, security, extension-exmaple, yii-extension beginner, extension-tutorial, Widgets, aliase, how-to-extension
Content
changed
[...]
4) For Access all the dependent files, use Yii standards Classes like
- [Register your script](http://www.yiiframework.com/doc/api/1.1/CClientScript "register your script")
- Current extension folder : $dir = dirname(__FILE__) . DIRECTORY_SEPARATOR . 'sources/files';
- CAssetManager :to avoid naming conflict , available as Yii::app()-assetManager [read more]( http://www.yiiframework.com/wiki/148/understanding-assets/ "read more ")
5) Initialize & check all the variables/attribute before use.
6) To access yii core libraries or other classes you can use import() in our extension
```php
Yii::import(‘zyx.abc.MyClasss’); // class
Yii::import('application.components.* '); // for entire package
```
7) Use your extensions : if your extension is in protected/extensions the you can access it by
```php
$this->widget('ext.myext.MyExt');
```[...]