A simple class that defines a profile of information used by the filepicker to indicate how it should behave and what functionality should be provided.
This is an immutable class.
The constructor and overrideWith methods of this class accept an associative array of parameters (see the properties below) to allow building or altering a profile object. Ths is the only time when properties of a profile can be adjusted.
$obj = new \CMSMS\FilePickerProfile( [ 'type'=>FileType::TYPE_IMAGE,
'exclude_prefix'=>'foo' ] );
package |
CMS |
---|---|
license |
GPL |
author |
Robert Campbell calguy1000@cmsmadesimple.org |
since | 2.2 |
property-read |
The top directory for the filepicker (relative to the CMSMS uploads directory) |
property-read |
The CMSMS FileType representing what files can be selected. |
property-read |
List only files/items that have the specified prefix. |
property-read |
exclude_prefix Exclude any files/items that have the specified prefix. |
property-read |
Users of the filepicker can create new directories. |
property-read |
Users of the filepicker can upload new files (of the specified type) |
property-read |
Users of the filepicker can remove files. |
property-read |
Whether thumbnail images should be shown in place of normal icons for images. |
property-read |
Indicates that hidden files should be shown in the filepicker. |
property-read |
Indicates whether files should be sorted before listing them in the filepicker. |
setValue(string $key, mixed $val)
string
$keyThe key to set
mixed
$valThe value to set.
__construct(array $params = null)
array
$paramsAn associative array of params suitable for hte setValue method.
overrideWith(array $params) : \CMSMS\FilePickerProfile
array
$paramsAssociative array of paramaters for the setValue method.
FLAG_NONE
FLAG_YES
FLAG_BYGROUP
top : string
The top directory for the filepicker (relative to the CMSMS uploads directory)
string
type : \CMSMS\FileType
The CMSMS FileType representing what files can be selected.
\CMSMS\FileType
match_prefix : string
List only files/items that have the specified prefix.
string
: string
exclude_prefix Exclude any files/items that have the specified prefix.
string
can_mkdir : boolean
Users of the filepicker can create new directories.
boolean
can_upload : boolean
Users of the filepicker can upload new files (of the specified type)
boolean
can_delete : boolean
Users of the filepicker can remove files.
boolean
show_thumbs : boolean
Whether thumbnail images should be shown in place of normal icons for images.
boolean
show_hidden : boolean
Indicates that hidden files should be shown in the filepicker.
boolean
sort : boolean
Indicates whether files should be sorted before listing them in the filepicker.
boolean