Example #1
0
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         if ($this->asfSimpleCMSPageRelatedByTreeParent !== null) {
             if (!$this->asfSimpleCMSPageRelatedByTreeParent->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->asfSimpleCMSPageRelatedByTreeParent->getValidationFailures());
             }
         }
         if (($retval = sfSimpleCMSPagePeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collsfSimpleCMSSlots !== null) {
             foreach ($this->collsfSimpleCMSSlots as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }