Download the PHP package kalamu/media-manager without Composer
On this page you can find all versions of the php package kalamu/media-manager. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download kalamu/media-manager
More information about kalamu/media-manager
Files in kalamu/media-manager
Package media-manager
Short Description Javascript library for media managment on top of a RESTfull API
License MIT
Informations about the package media-manager
Kalamu / Media Manager
This library is a JavaScript media manager based on top of a RESTFull API. The library include only the client side library.
The goal is to provide a simple interface for :
- consulting medias
- uploadind/downloading files
- making simple changes on medias
- selecting files (in a form context)
For the moment, the library only work for images, but we plan to manage more types of files shortly
KalamuMediaManager
Constructor
Config is a object with the following properties.
Parameter | Required ? | Description |
---|---|---|
lang |
optional | Define the interface language. If not set, navigator.language is used. Accepted values are : en, fr |
dropZone |
required | DOM Element to add files (by drag'n drop or file input) |
displayZone |
required | DOM Element to display the file list |
infoZone |
required | DOM Element that must be a bootstrap modal to display file informations |
apiEntryPoint |
required | URL address of the RESTfull API |
selectable |
optional | Define if the files can be selected. Accepted values are : none, single, multiple |
onStart |
optional | Function triggered at startup, once the file list has been fetched from the API |
onSelectionChanged |
optional | Function triggered when the user change the file selection |
Methods
getImages()
Return the list of image objects that are on the manager.
Exemple :
getSelection()
Return an array containing the identifier of each image selected.
Exemple :
setSelection(identifiers)
This method allow to set which files are selected.
Exemple :