예제 #1
0
파일: News.php 프로젝트: mtornero/slowshop
 /**
  * Clears the current object, sets all attributes to their default values and removes
  * outgoing references as well as back-references (from other objects to this one. Results probably in a database
  * change of those foreign objects when you call `save` there).
  */
 public function clear()
 {
     if (null !== $this->aResourceRelatedByResourceId) {
         $this->aResourceRelatedByResourceId->removeNewsRelatedByResourceId($this);
     }
     if (null !== $this->aFile) {
         $this->aFile->removeNews($this);
     }
     if (null !== $this->aResourceRelatedByNewsFor) {
         $this->aResourceRelatedByNewsFor->removeNewsRelatedByNewsFor($this);
     }
     $this->news_id = null;
     $this->resource_id = null;
     $this->news_headline = null;
     $this->news_opening = null;
     $this->news_body = null;
     $this->news_pic = null;
     $this->news_from = null;
     $this->news_to = null;
     $this->news_for = null;
     $this->news_weight = null;
     $this->created_at = null;
     $this->updated_at = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->applyDefaultValues();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }