Author: Pablo Kamil (pablokam@gmail.com)
Inheritance: extends ApplicationDataObject
コード例 #1
0
 public function afterValidate()
 {
     if (empty($this->principal) && empty($this->secondary)) {
         $this->addError('principal', 'Please select at least one diagnosis');
     }
     return parent::afterValidate();
 }
コード例 #2
0
ファイル: Report.class.php プロジェクト: rbolliger/otokou
 public function preSave($event)
 {
     parent::preSave($event);
     $invoker = $event->getInvoker();
     $vehicles = $invoker->getVehicles();
     $invoker->setNumVehicles(count($vehicles));
 }
コード例 #3
0
 public function afterValidate()
 {
     if (!empty($this->phrases)) {
         $has_phrases = false;
         foreach ($this->phrases as $phrase) {
             $phrase && ($has_phrases = true);
         }
         if (!$has_phrases) {
             $this->phrases = array();
         }
     }
     if (!$this->match_correspondence && !$this->match_legacy_letters) {
         $this->addError('match_correspondence', 'Please select which type of letters you want to search');
     }
     return parent::afterValidate();
 }
コード例 #4
0
ファイル: Report.class.php プロジェクト: abhinay100/feng_app
 /**
  * Construct the object
  *
  * @param void
  * @return null
  */
 function __construct()
 {
     parent::__construct();
 }
コード例 #5
0
ファイル: BaseReport.php プロジェクト: DBezemer/server
 /**
  * Returns a peer instance associated with this om.
  *
  * Since Peer classes are not to have any instance attributes, this method returns the
  * same instance for all member of this class. The method could therefore
  * be static, but this would prevent one from overriding the behavior.
  *
  * @return     ReportPeer
  */
 public function getPeer()
 {
     if (self::$peer === null) {
         self::$peer = new ReportPeer();
     }
     return self::$peer;
 }