PHP 클래스 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
상속: extends AbstractFile
파일 보기 프로젝트 열기: forkcms/forkcms

공개 메소드들

메소드 설명
getAbsolutePath ( string | null $subDirectory = null ) : string | null
getFallbackImage ( ) : null | string
getWebPath ( string | null $subDirectory = null ) : string | null
remove ( ) This function should be called for the life cycle event @ORM\PostRemove()
upload ( ) This function should be called for the life cycle events @ORM\PostPersist() and @ORM\PostUpdate()

보호된 메소드들

메소드 설명
getUploadRootDir ( string | null $subDirectory = null ) : string
removeOldFile ( ) This will remove the old image and if needed the generated thumbnails
writeFileToDisk ( )

메소드 상세

getAbsolutePath() 공개 메소드

public getAbsolutePath ( string | null $subDirectory = null ) : string | null
$subDirectory string | null
리턴 string | null

getFallbackImage() 공개 메소드

public getFallbackImage ( ) : null | string
리턴 null | string

getUploadRootDir() 보호된 메소드

protected getUploadRootDir ( string | null $subDirectory = null ) : string
$subDirectory string | null
리턴 string

getWebPath() 공개 메소드

public getWebPath ( string | null $subDirectory = null ) : string | null
$subDirectory string | null
리턴 string | null

remove() 공개 메소드

This function should be called for the life cycle event @ORM\PostRemove()
public remove ( )

removeOldFile() 보호된 메소드

This will remove the old image and if needed the generated thumbnails
protected removeOldFile ( )

upload() 공개 메소드

This function should be called for the life cycle events @ORM\PostPersist() and @ORM\PostUpdate()
public upload ( )

writeFileToDisk() 보호된 메소드

protected writeFileToDisk ( )