PHP Class Common\Doctrine\ValueObject\AbstractImage
You need to implement the method getUploadDir.
When using this class in an entity certain life cycle callbacks should be called
prepareToUpload for @ORM\PrePersist() and @ORM\PreUpdate()
upload for @ORM\PostPersist() and @ORM\PostUpdate()
remove for @ORM\PostRemove()
The following things are optional
A fallback image can be set by setting the full path of the image to the FALLBACK_IMAGE constant
By default we will use the fork way for image sizes (source, 100X100 etc)
if you don't want it set GENERATE_THUMBNAILS to false
Afficher le fichier
Open project: forkcms/forkcms
Méthodes publiques
Méthodes protégées
Method Details
getAbsolutePath()
public méthode
getFallbackImage()
public méthode
getUploadRootDir()
protected méthode
getWebPath()
public méthode
This function should be called for the life cycle event @ORM\PostRemove()
removeOldFile()
protected méthode
This will remove the old image and if needed the generated thumbnails
This function should be called for the life cycle events @ORM\PostPersist() and @ORM\PostUpdate()
writeFileToDisk()
protected méthode