public function getFilePath(File $file) { $name = $file->getStorageName(); if (!isset($name)) { $name = $file->getName(); } return $name; }
public function updateFile(Project $project, File $file) { // Update log $entry = new Log(); $entry->setProject($project); $entry->setOperation("update"); $entry->setData(json_encode(array('name' => $file->getName(), 'program' => $file->getProgram()))); $entry->setUser($this->user); $this->em->persist($entry); $this->em->flush(); }