title = 'Опросник';
$this->params['breadcrumbs'][] = $this->title;
$query = Inquirer::find()->orderBy([ 'id' => SORT_DESC]);
$count = $query->count();
$newsDataProvider = new \yii\data\ActiveDataProvider(
[
"query"=>$query,
"pagination" => [ 'pageSize' => 50 ]
]
);
?>
# |
заголовок |
URL |
статусы |
управление |
$key = 'Inquirer_list';
// if ($this->beginCache($key, ['duration' => 60*1])) {
foreach( $newsDataProvider->getModels() as $item ){
// print_r($item);
//return;
$strbage = '';
$mark = '';
if( $item->show == 'Y' ){
$mark = ' class="table-success"';
$strbage .= 'голосование
';
}
if( $item->active == 'N' ){
$mark = ' class="table-secondary"';
$strbage .= 'спрятан
';
}
?>
>
=$item->id?> |
=$item->text?>
|
https://www.amic.ru/inquirer/=$item->id?> |
=$strbage?> |
|
//
// print_r($item);
//
?>
}
// $this->endCache();
// }
?>
$count, 'defaultPageSize' => 50]);
echo "";