public function search()
{
$criteria = new CDbCriteria;
$criteria->compare('id' ,$this->id);
$criteria->compare('name' ,$this->name,true);
$criteria->compare('role_id' ,$this->role_id);
$criteria->compare('email' ,$this->email,true);
$criteria->compare('password' ,$this->password,true);
$criteria->compare('telephone' ,$this->telephone,true);
$criteria->compare('sys_date' ,$this->sys_date);
$criteria->compare('sys_date_update' ,$this->sys_date_update);
$criteria->compare('sys_user' ,$this->sys_user);
$criteria->compare('exist', '<>' . 2);
return new CActiveDataProvider($this,
[
'criteria' => $criteria,
'pagination'=>
[
'pageSize'=>100
],
]);
}
<?php $listData = ArrayHelper::map(\backend\models\Category::find()->all(), 'id', 'name'); ?>
<?= $form->field($aticleCategory, 'category_id')->dropDownList(
$listData,
[
'prompt' => 'Select...',
'multiple' => 'true',
'options' => array(1=>array('selected'=>'selected'))
]
)->label(''); ?>
<?php
use miloschuman\highcharts\Highcharts;
use yii\web\JsExpression;
$this->registerAssetBundle('yii\web\YiiAsset');
echo Highcharts::widget([
'options' => [
'title' => ['text' => 'Статистика за месяц'],
'xAxis' => [
'categories' => array_keys($statistic)
],
'yAxis' => [
'title' => ['text' => 'Достижения цели']
],
'series' => [
['name' => 'Jane', 'data' => array_values($statistic), 'class'=>'test-class'],
],
'plotOptions' => [
'series' => [
'cursor' => 'pointer',
'point' => [
'events' => [
'click' => new JsExpression('function(e){ alert(this.x); }')
]
]
]
]
]
]);
'rules'=>array(
'<view:(agreement|vendors|partners|about|howtobuy)>'=>'site/page',
'pages/<view:\w+>'=>'site/page',
),