В методе search модели Company добавил в конец:
Код: Выделить всё
$countQuery = clone $query;
$countQuery->select('COUNT(DISTINCT company.id)');
$dataProvider->setTotalCount($countQuery->scalar());
Код: Выделить всё
$countQuery = clone $query;
$countQuery->select('COUNT(DISTINCT company.id)');
$dataProvider->setTotalCount($countQuery->scalar());
Код: Выделить всё
Yii::t('UserModule/user', 'Login');
Код: Выделить всё
$modules = $this->getModules();
foreach ($modules as $id => $module) {
$this->getModule($id);
}
Код: Выделить всё
Yii::$app->response->format = 'json';
return ['foo'=>'bar']