コード例 #1
0
 function Validate()
 {
     if ($this->getDeleted() == TRUE) {
         //Check to make sure there are no hours using this break policy.
         $udtlf = new UserDateTotalListFactory();
         $udtlf->getByBreakPolicyId($this->getId());
         if ($udtlf->getRecordCount() > 0) {
             $this->Validator->isTRUE('in_use', FALSE, TTi18n::gettext('This break policy is in use'));
         }
     }
     return TRUE;
 }