Example #1
0
 /**
  * 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->auserSysRef) {
         $this->auserSysRef->removeContributions($this);
     }
     if (null !== $this->aFormats) {
         $this->aFormats->removeContributions($this);
     }
     if (null !== $this->aIssues) {
         $this->aIssues->removeContributions($this);
     }
     if (null !== $this->aTemplatenames) {
         $this->aTemplatenames->removeContributions($this);
     }
     $this->id = null;
     $this->_fortemplate = null;
     $this->_forissue = null;
     $this->_name = null;
     $this->_status = null;
     $this->_newdate = null;
     $this->_moddate = null;
     $this->__user__ = null;
     $this->__config__ = null;
     $this->_forchapter = null;
     $this->__parentnode__ = null;
     $this->__sort__ = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }