Image
class Image extends Document implements PrimaryKeyInterface, Serializable
Image
Constants
| VERSION |
Version path on server |
| UPLOAD_DIR |
Upload directory in server |
Properties
| protected string | $name | File name | from Document |
| protected string | $filePath | File path on server | from Document |
| protected float | $fileSize | File size | from Document |
| protected string | $code | Unique identifier for image. Used for storing image's erp code |
Methods
No description
Get rid of the DIR so it doesn't screw up when displaying uploaded doc/image inklimacold. the view.
Get main blob directory for uploaded blob files
Save base64 to file
Upload language file from base64 string
Set file name if file exists give it random name
No description
Upload file
Delete unused blob files
No description
A method that creates the appropriate day folder for every image uploaded
Image constructor.
No description
No description
No description
No description
No description
No description
Get position
No description
No description
No description
No description
No description
No description
(PHP 5 >= 5.1.0)
String representation of object
(PHP 5 >= 5.1.0)
Constructs the object
No description
No description
Create thumbnails
No description
No description
No description
No description
No description
No description
Details
in Helper at line 32
bool|string
image_resize(string $src, string $dst, int $width, int $height, int $crop = 0)
in Document at line 78
mixed
getName()
in Document at line 101
null|string
getAbsolutePath()
Get file absolute path on server
in Document at line 116
null|string
getWebPath()
Get full web path for file on server
in Document at line 131
null|string
getThumbPath()
Get thumbnail path on server
in Document at line 145
string
getDayFolder()
Get folder by date
in Document at line 155
string
getUploadDir()
Get rid of the DIR so it doesn't screw up when displaying uploaded doc/image inklimacold. the view.
in Document at line 167
string
getUploadRootDir()
Get upload root dir full path on server
in Document at line 177
static string
getWebDir()
Get web directory on server
in Document at line 189
static string
getMainBlobDirectoryForUpload()
Get main blob directory for uploaded blob files
in Document at line 201
string
getServer(bool $override = false)
Get server path
in Document at line 235
false|int
saveToFile(string $base64String, null $imageCode = null)
Save base64 to file
in Document at line 265
bool|int
saveBlobToFile(mixed $blob)
Save blob object to file
in Document at line 284
false|int
uploadLanguageFileYML(string $base64String)
Upload language file from base64 string
in Document at line 313
setFileName(int $size, string $extension)
Set file name if file exists give it random name
in Document at line 332
string
createThumbnail(int $size, string $extension, array $data, string $type)
in Document at line 400
string
getLanguageRootDir()
Get language translations root dir
in Document at line 410
string
getTmpDir()
Get temporary directory
in Document at line 424
int
uploadLanguageFile(string $locale, string $base64String)
in Document at line 467
bool
is_excel(String $extension)
Check if is excel
in Document at line 479
string
getLanguageFilePath()
Get language file path
in Document at line 489
float
getPeakMemoryInMegabytes()
Get peak memory in megabytes
in Document at line 501
int
returnFileSize()
Return file size
in Document at line 512
null|string
getAbsolutePathWithVersion()
Get absolute path with version
in Document at line 524
null|string
getAbsolutePathWithoutName()
Get absolute path without name
in Document at line 534
float
getFileSize()
in Document at line 542
setFileSize(float $fileSize)
in Document at line 550
updateFileSize()
set file size
in Document at line 558
deleteFile()
in Document at line 568
deleteLanguageFile()
in Document at line 584
static File
uploadFile(UploadedFile $uploadedFile, string $uploadDir, null $prefix = null)
Upload file
in Document at line 609
static
deleteUnusedBlobFiles(array $links, string $htmlString)
Delete unused blob files
in Document at line 655
static
deleteUnusedBlockElementsImages(array $mediaLinks, string $htmlString)
in Document at line 701
static
removeOldFiles(string $uploadDir, string $format = 'Y-m-d-h')
Remove old files
in Document at line 721
protected string
createFolder()
A method that creates the appropriate day folder for every image uploaded
in Document at line 750
protected string
createProFolder()
Create project folder if it does not exist
at line 185
__construct()
Image constructor.
at line 193
Product|null
getProduct()
at line 213
Brand|null
getBrand()
at line 233
ProductAttributeValues|null
getProductAttributeValue()
at line 243
Image
setProductAttributeValue(ProductAttributeValues|null $productAttributeValue)
at line 253
Category|null
getCategory()
at line 273
Category|null
getCategoryGallery()
at line 295
Image
setId(int $id)
at line 305
integer
getId()
at line 315
Image
setPosition(string $position)
at line 327
string
getPosition()
Get position
at line 335
string
getBase64Content()
at line 345
Image
setBase64Content(string $base64Content)
at line 355
bool
isWatermarkImage()
at line 365
Image
setWatermarkImage(bool $watermarkImage)
at line 375
int
getPriority()
at line 385
Image
setPriority(int $priority)
at line 400
string
serialize()
(PHP 5 >= 5.1.0)
String representation of object
at line 423
void
unserialize(string $serialized)
(PHP 5 >= 5.1.0)
Constructs the object
at line 435
mixed
getThumbnails()
at line 445
Image
setThumbnails(ArrayCollection $thumbnails)
at line 468
removeThumbnail(Thumbnail $thumbnail)
at line 477
createThumbnails()
Create thumbnails