permission = $permission; $this->file = $file; $this->userFileOwnerInterface = $user; } /** * @ORM\PrePersist * @ORM\PreUpdate */ public function onPersist(){ $this->file->addFileOwner($this); $this->userFileOwnerInterface->addFileOwner($this); } /** * Get id * * @return int */ public function getId() { return $this->id; } /** * Set permission * * @param integer $permission * * @return FileOwner */ public function setPermission($permission) { $this->permission = $permission; return $this; } /** * Get permission * * @return int */ public function getPermission() { return $this->permission; } /** * @param mixed $userFileOwnerInterface * @return FileOwner */ public function setUserFileOwnerInterface($userFileOwnerInterface) { $this->userFileOwnerInterface = $userFileOwnerInterface; return $this; } /** * @return mixed */ public function getUserFileOwnerInterface() { return $this->userFileOwnerInterface; } /** * @param mixed $file * @return FileOwner */ public function setFile($file) { $this->file = $file; return $this; } /** * @return mixed */ public function getFile() { return $this->file; } }