Advertisement
Sdelkadrom

Untitled

May 7th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.63 KB | None | 0 0
  1. public function actionAdmin()
  2. {
  3. Yii::app()->user->setState('menu_active', 'stats.admin');
  4.  
  5. $adminStatsBage = Yii::app()->controller->adminStatsBage;
  6.  
  7. $newsProductItems = array();
  8.  
  9. NewsProduct::getProductNews();
  10. $newsProduct = new NewsProduct;
  11. $newsProduct = $newsProduct->getAllWithPagination(null, 3);
  12. if (!empty($newsProduct['items']))
  13. $newsProductItems = $newsProduct['items'];
  14.  
  15. $this->render('admin', array(
  16. 'newsProductItems' => $newsProductItems,
  17. 'adminStatsBage' => $adminStatsBage,
  18. )
  19. );
  20. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement