; Defaults
xdebug.default_enable=1
xdebug.remote_enable=1
xdebug.remote_port=9000
; The Linux way
xdebug.remote_connect_back=1
; idekey value is specific to Visual Studio Code
xdebug.idekey=VSCODE
; Optional: Set to true to always auto-start xdebug
xdebug.remote_autostart=true
process.stdin.on('keypress', (str, key) => {
if (!!key.name) {
process.exit();
} else {
console.log(`You pressed the "${str}" key`);
console.log(!!key.name);
console.log(key);
console.log();
}
});
setTimeout((function a() {
console.log('I\'m Batman!');
setTimeout( a , 1);
}), 1);
$task = $query1->select(['deadline.id', 'deadline.text', 'deadline.status', 'deadline.deadline_date', 'COUNT(`comments`.`deadline_id`) AS comments_count'])
->from('deadline')
->join('LEFT JOIN', 'comments', '`deadline`.`id` = `comments`.`deadline_id`')
->where('`deadline`.`status` = 1')
->groupBy('deadline.id')
->all();
...... <?=
ModalCreateUserForm::widget([
'model' => $model,
'userRole' => "Администратор"
]);
?>.....
....
$form = ActiveForm::begin(['options' => ['class' => 'panel-body'],
'id' => 'createUserForm',
'enableAjaxValidation' => true,
'enableClientValidation' => true,
'validationUrl' => Url::to(['create-user-admin'])
]);
// $form = ActiveForm::begin([
// 'action' => Url::to(['users']),
// 'options' => ['class' => 'panel-body' ] ,
// 'id' => 'createUserForm',
// 'method' => 'POST',
// 'ajaxDataType' => 'x-www-form-urlencoded',
// 'enableAjaxValidation' => true]);
echo Html::beginTag('div', $options = ['class' => 'form-group']);
echo $form->field($this->model, 'login')->input('login')
->label('Логин');
echo Html::endTag('div');
echo Html::beginTag('div', $options = ['class' => 'form-group']);
echo $form->field($this->model, 'fullName')->input('login')
->label('Ф.И.О.');
echo Html::endTag('div');
echo Html::beginTag('div', $options = ['class' => 'form-group']);
echo $form->field($this->model, 'email')->input('email')->label('E-mail');
echo Html::endTag('div');
echo Html::beginTag('div', $options = ['class' => 'form-group']);
echo $form->field($this->model, 'password')->passwordInput()->label('Пароль');
echo Html::endTag('div');
echo Html::beginTag('div', $options = ['class' => 'form-group']);
echo $form->field($this->model, 'confirmPassword')->passwordInput()->label('Подтваердить пароль');
echo Html::endTag('div');
echo Html::beginTag('div', $options = ['class' => 'modal-footer']);
echo Html::a($text = 'Close', $url = "#", $options = [
'class' => 'btn btn-white',
'data-dismiss' => 'modal'
]);
echo Html::submitButton('Создать', ['class' => 'btn btn-primary']);
ActiveForm::end();....
Сам кусок виджета public function actionIndex() {
$query = Users::find();
$start = \Yii::$app->request->get('start');
$limit = \Yii::$app->request->get('length');
$pagination = new Pagination([
'totalCount' => $query->count(),
]);
$users['data'] = $query->offset($start)
->limit($limit)
->all();
$users['recordsTotal'] = $pagination->totalCount;
$users['recordsFiltered'] = $pagination->totalCount;
return $users;
}
if ( $args->has_children && $depth === 0 ) {
$atts['href'] = $item->url;
$atts['data-hover'] = 'dropdown';
$atts['class'] = 'dropdown-toggle';
$atts['aria-haspopup'] = 'true';
} else {
$atts['href'] = ! empty( $item->url ) ? $item->url : '';
}