App\Gallery
Inherited from cmsApplication_HierarchicalTree_List
Protected Attributes
protected | $data_directories | = [ 'watermark' => '/media/gallery/watermark' |
protected | $default_sizes | = [ 'thumbnail' => ['width' => 256 |
Protected Methods
protected | deleteImageFilesByRelativePath($url_media_file) |
protected array | initializeImageGalleryDirectories() Creates all the folder as defined in $this->data_directory if not exists. Returns a string array of errorlist, or an empty/null array if there's no error $SystemLog
|
protected bool | createImageThumbnail(string $src, string $dest, int $thumb_width=120, int $thumb_height=120, bool $dont_resize_if_smaller=false, int $quality=100, string $watermark_img_path='', int $watermark_opacity=100, string $watermark_pos='', int $watermark_margin_x, int $watermark_margin_y) Create an image thumbnail and raise memory limit if possible. If dont_resize_if_smaller flag is specified and the source image is smaller than the specified thumbnail width and height then it will just be copied. Quality is a number between 1 - 100
|
Public Methods
public | __construct() |
public | viewMainPage(int $pg=1) View Main Page
|
public string | createFriendlyURL(string $str) Creates a friendly URL
|
public array | interpretFriendlyURL(string $urlpath) Interprets command from SEO-friendly URL
|
public | delete(string $mixed_items_to_delete) Delete objects. Parameter $mixed_items_to_delete is a category/item comma separated values e.g. c5,c6,c9,i4,i14 $SystemDB
|
public | onAfterSaveCategory($datavalues, $original_datavalues, $previous_category, $retval) |
public | getGalleryImage(string $image_size, string $path, int $category_id, bool $with_hash=false) Returns the URL of an image
|
public | modifyDataValuesBeforeSaveItem(array $datavalues) Override default modify item data before save
|
public | getImageSizeNames() |
public | getDefaultSizes() |
public | getImageDataDirectoryNames() |
public | ensureDataDirectoryExists() Ensure directory exists
|
public | viewIndividualCategoryByID($id) |
public | getCacheableImages() |
public int | getDefaultCategoryID() Returns the default category ID
|
public array | getMainpageMetaOptionKeys() Returns an array containing on array of main page options. The values of the options will still be evaluated as a flat list array, however it is sectioned into array with the following keys: header, value, type, and options.
Label: section title (not used for any evaluationType: checkboxgroup, dropdownlist, or none. If none, then it means there are suboptions which contain another array of thisKey: the key option. Please note that checkboxgroup doesn't have a key since the keys are in the optionsOptions: an array with 2 keys: label and key
Label: section title (not used for any evaluation
Type: checkboxgroup, dropdownlist, or none. If none, then it means there are suboptions which contain another array of this
Key: the key option. Please note that checkboxgroup doesn't have a key since the keys are in the options
Options: an array with 2 keys: label and key
|
public array | getCategoryMetaOptionKeys() Returns an array containing on array of main page options. In this base class, the key is almost similar to getCategoryMetaOptionKeys The values of the options will still be evaluated as a flat list array, however it is sectioned into array with the following keys: header, value, type, and options.
Label: section title (not used for any evaluationType: checkboxgroup, dropdownlist, or none. If none, then it means there are suboptions which contain another array of thisKey: the key option. Please note that checkboxgroup doesn't have a key since the keys are in the optionsOptions: an array with 2 keys: label and key
Label: section title (not used for any evaluation
Type: checkboxgroup, dropdownlist, or none. If none, then it means there are suboptions which contain another array of this
Key: the key option. Please note that checkboxgroup doesn't have a key since the keys are in the options
Options: an array with 2 keys: label and key
|
public array | getItemMetaOptionKeys() Returns an array containing on array of item options. The values of the options will still be evaluated as a flat list array, however it is sectioned into array with the following keys: header, value, type, and options.
Label: section title (not used for any evaluationType: checkboxgroup, dropdownlist, or none. If none, then it means there are suboptions which contain another array of thisKey: the key option. Please note that checkboxgroup doesn't have a key since the keys are in the optionsOptions: an array with 2 keys: label and key
Label: section title (not used for any evaluation
Type: checkboxgroup, dropdownlist, or none. If none, then it means there are suboptions which contain another array of this
Key: the key option. Please note that checkboxgroup doesn't have a key since the keys are in the options
Options: an array with 2 keys: label and key
|
public bool | createMultipleImageSizesForOriginalImage(string $url_media_file, int $category_id) Create a small, medium, and large image from original file in the data directory
|
public boolean | createThumbnailWithWatermark(string $src, string $dest, int $thumb_width=120, int $thumb_height=120, bool $dont_resize_if_smaller=false, int $quality=100, string $watermark_img_path='', $waternark_opacity=100, $watermark_pos='', $watermark_margin_x, $watermark_margin_y) Create an image thumbnail. If dont_resize_if_smaller flag is specified and the source image is smaller than the specified thumbnail width and height then it will just be copied. Quality is a number between 1 - 100
|
public bool | Run(array $command) Run command passed by the main router
|