Ejemplo n.º 1
0
 function indexAction()
 {
     $fc = FrontController::getInstance();
     $model = new FrontModel();
     $popProducts = (new IndexWidgets())->recAndPopProductsWidget('popular', 6);
     $recProducts = (new IndexWidgets())->recAndPopProductsWidget('recommended');
     $model->setData(['slides' => IndexWidgets::getSliderWidget(), 'currentCategory' => (new IndexWidgets())->currentCategoryWidget(Helper::getSiteConfig()->currentCategoryWidget), 'popularProducts' => Generator::popularProducts($popProducts, 6), 'recommendedProducts' => Generator::recommendedProducts($recProducts)]);
     $output = $model->render('../views/index.php', 'main');
     $fc->setPage($output);
 }