Esempio n. 1
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);
 }
Esempio n. 2
0
 public function getQuote()
 {
     if (!$this->_quote instanceof Quote) {
         $this->_quote = Quote::getById($this->getIdQuote());
     }
     return $this->_quote;
 }
Esempio n. 3
0
 protected function __setData($data)
 {
     $this->__setContentFields();
     $this->_entity->setShownOnClinic($data->show_on_clinic);
 }