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\Pjax run()

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

widgets\PjaxAsset $depends

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

widgets\PjaxAsset $sourcePath

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

widgets\PjaxAsset $js

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

widgets\Pjax $submitEvent

$submitEvent public property (available since version 2.0.9) The jQuery event that will trigger form handler. Defaults to "submit". public string $submitEvent = 'submit'

widgets\Pjax $timeout

$timeout public property Pjax timeout setting (in milliseconds). This timeout is used when making AJAX requests. Use a bigger number if your server is slow. If the server does not respond within the timeout, a full page load will be triggered. public integer $timeout = 1000