<div class="a b" id="ab"></div>
ab.classList;
(2) ["a", "b", value: "a b"]
ab.classList.add('c');
<div class="a b с" id="ab"></div>
$file = \Yii::getAlias('@webroot/archive'.microtime().'.zip');
$zip = new \ZipArchive();
$zip->open($file, \ZIPARCHIVE::CREATE);
$zip->addFile("index.php");//добавляем файлы в архив
$zip->close();
if (file_exists($file)) {
\Yii::$app->response->sendFile($file, 'archive.zip');
ignore_user_abort(true);//удаление временного файла
if (connection_aborted()) unlink($file);
register_shutdown_function('unlink', $file);
}
[
'attribute' => 'created_at',
'format' => 'datetime',
'filter' => DatePicker::widget([
'model' => $searchModel,
'attribute' => 'date_from',
'attribute2' => 'date_to',
'type' => DatePicker::TYPE_RANGE,
'separator' => '-',
'pluginOptions' => ['format' => 'yyyy-mm-dd']
])
],
SELECT * FROM table1 WHERE DATE(timestamp_field) = '2017-10-09';
'language' => 'ru-RU',
'components' => [
'i18n' => [
'translations' => [
'*' => [
'sourceLanguage' => 'ru-RU',
'class' => 'yii\i18n\PhpMessageSource',
'basePath' => '@app/messages',
'fileMap' => [
'app' => 'app.php',
'app/error' => 'error.php',
],
],
],
],
]
<?php
return [
'Create' => 'Добавить',
'Update' => 'Обновить',
'Delete' => 'Удалить',
'Create {modelClass}' => 'Добавить {modelClass}',
'Update {modelClass}' => 'Обновить {modelClass}',
]
Yii::t('app', 'Create');
chart.data.labels = newLabels
chart.data.datasets = newDatasets
chart.update()