upload() публичный Метод

This function should be called for the life cycle events @ORM\PostPersist() and @ORM\PostUpdate()
public upload ( )
Пример #1
0
 /**
  * This function should be called for the life cycle events @ORM\PostPersist() and @ORM\PostUpdate()
  */
 public function upload()
 {
     $file = $this->getFile();
     parent::upload();
     if (static::GENERATE_THUMBNAILS && $file instanceof UploadedFile) {
         Model::generateThumbnails(FRONTEND_FILES_PATH . '/' . $this->getTrimmedUploadDir(), $this->getAbsolutePath('source'));
     }
 }