예제 #1
0
 public function getFilePath(File $file)
 {
     $name = $file->getStorageName();
     if (!isset($name)) {
         $name = $file->getName();
     }
     return $name;
 }
예제 #2
0
 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();
 }