示例#1
0
 public function indexAction()
 {
     //get landing page text
     $mptext = new Application_Model_Mpr();
     $this->view->row_text = $mptext->getText();
     // for banner
     $banner = new Application_Model_Banner();
     $this->view->banner = $banner->getMainBanner();
     //for social links
     $links = new Application_Model_SocialLinks();
     $this->view->links = $links->getSocialLinks();
     //for strip banner
     $strip = new Application_Model_StripBanner();
     $this->view->strip = $strip->getMainStripBanner();
     //for videos
     $results = $this->video->getFeaturedVideos();
     if (count($results) > 0) {
         $this->Paginator($results);
     } else {
         $this->view->empty_rec = true;
     }
     //for testimonial is featured
     $result = $this->testimonial->getFeaturedTestimonial();
     $this->view->i = 1;
     $this->view->list = $result;
 }
示例#2
0
 protected function __setData($data)
 {
     $photo = RM_Photo::getById($data->id_photo);
     if (!$photo instanceof RM_Photo) {
         throw new Exception('Загрузите фото');
     } else {
         $this->_entity->setPhoto($photo);
     }
     $this->_entity->setName($data->name);
     $quote = Application_Model_Quote::getById($data->id_quote);
     if ($quote) {
         $this->_entity->setQuote($quote);
     } else {
         $this->_entity->resetQuote();
     }
     $this->_entity->setShownOnMain((bool) $data->show_on_main);
     $this->_entity->setShownOnClinic((bool) $data->show_on_clinic);
 }
示例#3
0
 static function listarBanner()
 {
     $modelBanner = new Application_Model_Banner();
     return $modelBanner->listarBanners();
 }