Declaration
class Declaration extends Document implements TranslatableInterface, BlockEntity
Class Declaration
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 | $title | Declaration title | |
| protected string | $path | Uplaoded image web path | |
| protected string | $description | Declaration description | |
| protected DateTime | $createdAt | Date when declaration was created | |
| protected string | $locale | Language locale | |
| protected Image | $image | Declaration image |
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
No description
No description
No description
No description
No description
No description
No description
Function that copy web path from image declaration to object
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
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 154
int
getId()
at line 164
Declaration
setId(int $id)
at line 174
DeclarationCategory|null
getCategory()
at line 184
Declaration
setCategory(mixed $category)
at line 194
string
getBase64Content()
at line 204
Declaration
setBase64Content(string $base64Content)
at line 214
DateTime
getCreatedAt()
at line 224
Declaration
setCreatedAt(DateTime $createdAt)
at line 234
setAutoWebPath()
Function that copy web path from image declaration to object
at line 242
string
getTitle()
at line 252
Declaration
setTitle(string $title)
at line 262
string
getPath()
at line 272
Declaration
setPath(string $path)
at line 287
string
serialize()
(PHP 5 >= 5.1.0)
String representation of object
at line 309
void
unserialize(string $serialized)
(PHP 5 >= 5.1.0)
Constructs the object