<?php
namespace front\Views;

class Banners
{
    public static function banners($banners)
    {
        $tpl = new \Shared\Tpl\Tpl;
        $tpl->banners = $banners;
        return $tpl->render('banner/banners');
    }

    public static function mainBanner($banner)
    {
        if (!\Shared\Helpers\Helpers::get_session('banner_close') && is_array($banner)) {
            $tpl = new \Shared\Tpl\Tpl;
            $tpl->banner = $banner;
            return $tpl->render('banner/main-banner');
        }
    }
}
