PUBLIC_PATH
PUBLIC_PATH
deleteFileEntity(\Media\Entity\File $file)
Deletes File entity
\Media\Entity\File | $file |
deleteObjectFileEntity(\Media\Entity\File $file)
Deletes ObjectFile entity
\Media\Entity\File | $file |
createFile(\Media\Form\FileUpload $form, $object) : \Media\Entity\File
Creates file using sub-methods to write file and to associate it with an object
\Media\Form\FileUpload | $form | |
$object |
associateFileWithObject(\Media\Entity\File $file, $object)
Makes an association between a created file and an entity. It means, that the object file be the owner of the file
\Media\Entity\File | $file | |
$object |
writeFile(\Media\Form\FileUpload $form) : \Media\Entity\File
Writes file to a DB and moves it to an appropriate path
\Media\Form\FileUpload | $form |
convertFile(\Media\Entity\File $file) : \Media\Entity\File
Converts file according to its type
\Media\Entity\File | $file |
imgPath( $type, $id, $ext, boolean $from = \Media\Service\File::FROM_ROOT) : string
Returns a path to an image file from root directory of a project (perfect choice for processing file) or from public directory (perfect choice for displaying a link) using predefined constants in Media\Service\File
$type | ||
$id | ||
$ext | ||
boolean | $from |