Esempio n. 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->auser) {
         $this->auser->removeAssignedRoleRelatedByUserId($this);
     }
     if (null !== $this->aassignedBy) {
         $this->aassignedBy->removeAssignedRoleRelatedByAssignedBy($this);
     }
     if (null !== $this->acanon) {
         $this->acanon->removeAssignedRole($this);
     }
     if (null !== $this->arole) {
         $this->arole->removeAssignedRole($this);
     }
     $this->id = null;
     $this->user_id = null;
     $this->canon_id = null;
     $this->role_id = null;
     $this->assigned_by = null;
     $this->alreadyInSave = false;
     $this->clearAllReferences();
     $this->resetModified();
     $this->setNew(true);
     $this->setDeleted(false);
 }