Пример #1
0
 protected function doValidate($columns = null)
 {
     if (!$this->alreadyInValidation) {
         $this->alreadyInValidation = true;
         $retval = null;
         $failureMap = array();
         if ($this->asfSimpleForumForum !== null) {
             if (!$this->asfSimpleForumForum->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->asfSimpleForumForum->getValidationFailures());
             }
         }
         if ($this->asfSimpleForumPost !== null) {
             if (!$this->asfSimpleForumPost->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->asfSimpleForumPost->getValidationFailures());
             }
         }
         if ($this->asfGuardUser !== null) {
             if (!$this->asfGuardUser->validate($columns)) {
                 $failureMap = array_merge($failureMap, $this->asfGuardUser->getValidationFailures());
             }
         }
         if (($retval = sfSimpleForumTopicPeer::doValidate($this, $columns)) !== true) {
             $failureMap = array_merge($failureMap, $retval);
         }
         if ($this->collsfSimpleForumPosts !== null) {
             foreach ($this->collsfSimpleForumPosts as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         if ($this->collsfSimpleForumTopicViews !== null) {
             foreach ($this->collsfSimpleForumTopicViews as $referrerFK) {
                 if (!$referrerFK->validate($columns)) {
                     $failureMap = array_merge($failureMap, $referrerFK->getValidationFailures());
                 }
             }
         }
         $this->alreadyInValidation = false;
     }
     return !empty($failureMap) ? $failureMap : true;
 }