Interface MediaProviderInterface
interface used by media provider helper as (youtube, vimeo, ...)
Methods summary
public
boolean
|
#
isSourceAvailable( array $object )
Return true if source is available for $object else return false
Return true if source is available for $object else return false
Parameters
- $object
- a representation of BEdita object
Returns
boolean
|
public
array
|
#
source( array $object )
Return an array with url to the source and related mime type
If source is not available it should return an empty array
Return an array with url to the source and related mime type
If source is not available it should return an empty array
The array returned should be in the form
array(
'url' => 'http://example.com/video.mpg',
'mime_type' => 'video/mpeg'
)
Parameters
- $object
- a representation of BEdita object
Returns
array
|
public
string|boolean
|
#
embed( array $object, array $attributes )
Return the html to embed using provider UI
Return the html to embed using provider UI
Parameters
- $object
- a representation of BEdita object
- $attributes
- HTML attributes
Returns
string|boolean return false if it fails to get data
|
public
string
|
#
thumbnail( array $object, array $htmlAttributes, boolean $URLonly )
Return the thumbnail supplied by provider as tag
If $URLonly is true return only the url to img
Return the thumbnail supplied by provider as tag
If $URLonly is true return only the url to img
Parameters
- $object
- a representation of BEdita object
- $htmlAttributes
- HTML attributes to set in tag
- $URLonly
- true to return only the image url
Returns
string
|