dev-master
9999999-devKendo UI Extension for Yii 2
BSD-3-Clause
The Requires
- php >=5.6
- yiisoft/yii2 *
by Sergey Tigrov
yii2 datasource kendo kendoui
Kendo UI Extension for Yii 2
Currently implemented DataSource which is generating on ActiveRecord model-base., (*1)
Can be used with: * Kendo Grid * Kendo List * other features are requiring DataSources, (*2)
@app/controllers/AddressController.php, (*3)
use \tigrov\kendoui\KendoBuild; class AddressController extends Controller { public function actionIndex() { return $this->render('index'); } public static function kendoActions() { // Address extends of ActiveRecord $options = [ 'model' => Address::className(), 'query' => [ 'where' => ['status_id' => Address::STATUS_ACTIVE], ], ]; return KendoBuild::actions($options); } public function actions() { return array_merge(parent::actions(), static::kendoActions()); } }
@app/views/address/index.php, (*4)
setTitle(\Yii::t('user', 'Addresses')); KendoAsset::register($this); $dataSource = \Yii::createObject([ 'class' => DataSource::className(), ]); $dataSourceSettings = $dataSource->getSettings(); $dataSourceJson = json_encode($dataSourceSettings); $this->registerJs(
Kendo UI Extension for Yii 2
BSD-3-Clause
yii2 datasource kendo kendoui