Yii

All Classes | Properties | Methods Inheritance Yii ยป yii\BaseYii Available since version 2.0 Source Code https://github.com/yiisoft/yii2/blob/master/framework/Yii.php Yii is a helper class serving common framework functionalities. It extends from yii\BaseYii which provides the actual implementation. By writing your own Yii class, you can customize some functionalities of yii\BaseYii. Public Properties Property Type Description Defined By $aliases array Registered path aliases yii\BaseYi

Working with Client Scripts

Note: This section is under development. Registering scripts With the yii\web\View object you can register scripts. There are two dedicated methods for it: registerJs() for inline scripts and registerJsFile() for external scripts. Inline scripts are useful for configuration and dynamically generated code. The method for adding these can be used as follows: $this->registerJs("var options = ".json_encode($options).";", View::POS_END, 'my-options'); The first argument is the actual JS code

widgets\Spaceless run()

run() public method Marks the end of content to be cleaned from whitespace characters between HTML tags. Stops capturing an output and echoes cleaned result. public void run ( )

widgets\Spaceless init()

init() public method Starts capturing an output to be cleaned from whitespace characters between HTML tags. public void init ( )

widgets\PjaxAsset $depends

$depends public property public $depends = ['yii\web\YiiAsset']

widgets\Pjax run()

run() public method Executes the widget. public string run ( )return string The result of widget execution to be outputted.

widgets\PjaxAsset $sourcePath

$sourcePath public property public $sourcePath = '@bower/yii2-pjax'

widgets\PjaxAsset $js

$js public property public $js = ['jquery.pjax.js']

widgets\Pjax requiresPjax()

requiresPjax() protected method protected boolean requiresPjax ( )return boolean Whether the current request requires pjax response from this widget

widgets\Pjax init()

init() public method Initializes the object. This method is invoked at the end of the constructor after the object is initialized with the given configuration. public void init ( )