Public Member Functions | Public Attributes

BeUploadToObjComponent Class Reference

Upload component: common file, multimedia file, third party multimedia url (vimeo, youtube, etc. More...

List of all members.

Public Member Functions

 startup (&$controller)
 upload ($dataStream=null, $formFileName="Filedata")
 Uploads a file to location and create stream object.
 uploadFromURL ($dataURL, $clone=false)
 Create obj stream from URL.
 cloneMediaObject (&$data, $cloneOnlyFile=false)
 Clone data for media This method is not intended to upload file!
 getThumbnail ($data)
 Get thumbnail for media.

Public Attributes

 $components = array('BeFileHandler', 'BeVimeo', 'BeYoutube')

Detailed Description

Upload component: common file, multimedia file, third party multimedia url (vimeo, youtube, etc.

)

Definition at line 26 of file be_upload_to_obj.php.


Member Function Documentation

BeUploadToObjComponent::cloneMediaObject ( &$  data,
cloneOnlyFile = false 
)

Clone data for media This method is not intended to upload file!

Its purpose is to clone $data into another multimedia object (or in the same if $cloneOnlyFile = true) If $cloneOnlyFile = true file data and file on filesystem will be cloned and $data will be saved on the same multimedia object

If $data['uri'] is filled and it's not an url the original file located in Configure::read("mediaRoot") . $data["uri"] will be duplicate with different name and attached to cloned object

Parameters:
array $data
bool $cloneOnlyFile, true to clone only file (no new multimedia object will be created if $data['id'] is populated)
Returns:
mixed boolean|int, false if cloning was unsuccessful, int $id otherwise

Definition at line 147 of file be_upload_to_obj.php.

References uploadFromURL().

BeUploadToObjComponent::getThumbnail ( data  ) 

Get thumbnail for media.

Parameters:
array $data
Returns:
array
Exceptions:
BEditaMediaProviderException 

Definition at line 183 of file be_upload_to_obj.php.

BeUploadToObjComponent::upload ( dataStream = null,
formFileName = "Filedata" 
)

Uploads a file to location and create stream object.

Parameters:
array $dataStream
string $formFileName
Returns:
mixed int|boolean, object_id if upload was successful, false otherwise.

Definition at line 41 of file be_upload_to_obj.php.

BeUploadToObjComponent::uploadFromURL ( dataURL,
clone = false 
)

Create obj stream from URL.

Form must have: url, title, lang.

Parameters:
string $dataURL
boolean $clone
Returns:
mixed boolean|int, false if upload was unsuccessful, int $id otherwise
Exceptions:
BEditaMediaProviderException 

Definition at line 92 of file be_upload_to_obj.php.

Referenced by cloneMediaObject().


The documentation for this class was generated from the following file:
Generated on Fri Dec 11 2015 15:29:46 by Doxygen 1.7.1  BEditaBEdita 3.7 Corylus