BEdita API doc | 4-cactus
  • Class
  • Tree
  • Deprecated
  • Download

Classes

  • Addon
  • AddressbookController
  • AddressbookShell
  • AdminController
  • Alias
  • Annotation
  • ApiAuthComponent
  • ApiBaseController
  • ApiFormatterComponent
  • ApiUploadComponent
  • ApiValidatorComponent
  • AppController
  • AppError
  • AppHelper
  • Application
  • AppModel
  • Area
  • AreasController
  • Audio
  • AuthenticationsController
  • BannedIp
  • BEAppModel
  • BEAppObjectModel
  • BeAuthComponent
  • BeAuthFacebookComponent
  • BeAuthGoogleComponent
  • BeAuthTwitterComponent
  • BeCallbackManager
  • BeConfigure
  • BeCustomPropertyComponent
  • BeditaAnnotationModel
  • BeditaBaseShell
  • BeditaCollectionModel
  • BeditaContentModel
  • BeditaExportFilter
  • BeditaImportFilter
  • BeditaObjectModel
  • BeditaProductModel
  • BeditaShell
  • BeditaSimpleObjectModel
  • BeditaSimpleStreamModel
  • BeditaStreamModel
  • BeEmbedFlashHelper
  • BeEmbedHtml5Helper
  • BeEmbedMediaHelper
  • BeErrorCode
  • BeExceptionHandler
  • BEFile
  • BeFileHandlerComponent
  • BeFormHelper
  • BeFrontHelper
  • BeHashComponent
  • BeHtmlHelper
  • BeLangTextComponent
  • BeLib
  • BeMailComponent
  • BEObject
  • BeObjectCache
  • BePaginatorToolbarHelper
  • BeSchema
  • BeSecurityComponent
  • BeSystem
  • BeSystemComponent
  • BeThumb
  • BeTimeHelper
  • BeToolbarHelper
  • BeTreeComponent
  • BeTreeHelper
  • BeUploadToObjComponent
  • BeurlHelper
  • BeVimeoComponent
  • BeYoutubeComponent
  • BuildFilterBehavior
  • CacheableBehavior
  • CacheShell
  • CallbackBehavior
  • CaptchaComponent
  • Caption
  • CaptionsBehavior
  • Card
  • CardsImportFilter
  • Category
  • CleanupDataTask
  • CleanupTask
  • Comment
  • CommentsController
  • CompactResultBehavior
  • Content
  • CreateIndexFieldsBehavior
  • DataShell
  • DataTransfer
  • DateItem
  • DbadminShell
  • DeleteDependentObjectBehavior
  • DeleteObjectBehavior
  • DeployShell
  • Document
  • DocumentsController
  • DumpModel
  • EditorialContentsShell
  • EditorNote
  • Event
  • EventLog
  • EventsController
  • FilesController
  • ForeignDependenceSaveBehavior
  • FrontendController
  • FrontendShell
  • GalleriesController
  • Gallery
  • GeoTag
  • GettextShell
  • Git
  • GravatarHelper
  • Group
  • HashJob
  • History
  • HomeController
  • Image
  • ImageInfoHelper
  • JsonExportFilter
  • JsonImportFilter
  • JsonView
  • LangText
  • Link
  • MailGroup
  • MailGroupCard
  • MailJob
  • MailLog
  • MailMessage
  • MailShell
  • MailTemplate
  • Mask
  • MediaShell
  • MigrateDumpModel
  • MigrateShell
  • Migration
  • MigrationBase
  • MigrationDateItemsShell
  • Module
  • ModulesController
  • ModuleShell
  • MultimediaController
  • NewsController
  • NewsletterController
  • NewsletterShell
  • NotifyBehavior
  • ObjectEditor
  • ObjectProperty
  • ObjectRelation
  • ObjectType
  • ObjectUser
  • PagesController
  • Permission
  • PermissionModule
  • PermsHelper
  • Product
  • Property
  • PropertyOption
  • PublicationShell
  • RedisShell
  • RelationCheck
  • RelationRepair
  • RelationShell
  • RelationStats
  • RemoveDummyNameBehavior
  • ResponseHandlerComponent
  • RestClientModel
  • Revision
  • RevisionObjectBehavior
  • SearchText
  • SearchTextSaveBehavior
  • Section
  • SectionDummy
  • SessionFilterComponent
  • SessionFilterHelper
  • ShortNews
  • SmartyView
  • SoapClientModel
  • SplitterSql
  • StatisticsController
  • Stream
  • StreamLog
  • StreamsController
  • Svn
  • TagsController
  • ThemeSmartyView
  • ThumbnailHelper
  • ThumbShell
  • TransactionComponent
  • TransactionFS
  • TranslationsController
  • Tree
  • TrHelper
  • User
  • UserProperty
  • UsersController
  • Utility
  • Version
  • Video
  • VimeoHelper
  • WebmarksController
  • XmlExportFilter
  • XmlImportFilter
  • XmlJsonConverter
  • XmlView
  • YoutubeHelper

Interfaces

  • ApiAuthInterface
  • MediaProviderInterface
  • UploadableInterface

Exceptions

  • BeditaAjaxException
  • BEditaAllowURLException
  • BeditaBadRequestException
  • BeditaConflictException
  • BEditaDeleteStreamObjException
  • BeditaException
  • BEditaFileExistException
  • BeditaForbiddenException
  • BeditaFrontAccessException
  • BeditaHashException
  • BEditaInfoException
  • BeditaInternalErrorException
  • BEditaIOException
  • BeditaLengthRequiredException
  • BeditaMailException
  • BEditaMediaProviderException
  • BeditaMethodNotAllowedException
  • BEditaMIMEException
  • BeditaNotFoundException
  • BeditaNotImplementedException
  • BeditaPublicationException
  • BeditaRuntimeException
  • BEditaSaveStreamObjException
  • BeditaServiceUnavailableException
  • BeditaUnauthorizedException
  • BEditaUploadPHPException
  • BEditaURLException

Class BeEmbedMediaHelper

Helper class to embed media contents

Helper
Extended by AppHelper
Extended by BeEmbedMediaHelper
Located at views/helpers/be_embed_media.php

Methods summary

public
# __construct( )
public
# getValidImplementations( )
public string,
# object( array $obj, array $params = null, array $htmlAttributes = array() )

object public method: embed a generic bedita multimedia object return html for object $obj with options $params and html attributes $htmlAttributes

object public method: embed a generic bedita multimedia object return html for object $obj with options $params and html attributes $htmlAttributes

Parameters

$obj
BEdita Multimedia Object
$params

optional, parameters used by external libraries such as BeThumb->image possible value for params: 'presentation' => 'thumb', 'full', 'link' (default defined by $defaultPresentation attribute) 'URLonly' => if setted return only url

     ## USED only for image thumbnail on filesystem ##
     width, height, longside, at least one required, integer (if longside, w&h are ignored)
     mode, optional, 'crop'/'fill'/'croponly'/'stretch'
     modeparam, optional, depends on mode:
        if fill, string representing hex color, ie 'FFFFFF'
        if croponly, string describing crop zone 'C', 'T', 'B', 'L', 'R', 'TL', 'TR', 'BL', 'BR'
        if stretch, bool to allow upscale (default false)
     type, optional, 'gif'/'png'/'jpg', force image target type
     upscale, optional, bool, allow or not upscale
$htmlAttributes
html attributes

Returns

string,
output complete html tag
protected
# getCurrentConf( )

update object properties according to current configure values for: - media - mediaRoot - mediaUrl - tmp - imgMissingFile

update object properties according to current configure values for: - media - mediaRoot - mediaUrl - tmp - imgMissingFile

private string
# thumbnail( array & $obj, array $htmlAttributes = array(), boolean $URLonly = false )

get img tag for thumbnail

get img tag for thumbnail

Parameters

$obj
$htmlAttributes
$URLonly

Returns

string
html
private string
# embed( array $obj, array $params = array(), array $attributes = array() )

get embed video/audio

get embed video/audio

Parameters

$obj
$params
$attributes

Returns

string
html
private string
# showImage( array $obj, array $params, array $htmlAttributes )

produce html tag for image

produce html tag for image

if present $params['URLonly'], return uri of $obj if present $params['presentation']=='link', return html link for $obj uri else return html image for $obj uri (@see HtmlHelper) if present $params['sizeAttributes'] with a truthy value, adds calculated width/height attributes to the HTML tag.

Parameters

$obj
$obj, object
$params
$params, specific parameters
$htmlAttributes
$htmlAttributes, html attributes

Returns

string
private string
# showVideo( array $obj, array $params, array $htmlAttributes )

html video output return html or uri for video $obj, with options $params and html attributes $htmlAttributes if $params['presentation'] == 'thumb' => return html thumb ($params['URLonly'] not present) or thumb uri ($params['URLonly'] is present) if $params['presentation'] == 'full' => return embed object if $params['presentation'] == 'link' => return object link

html video output return html or uri for video $obj, with options $params and html attributes $htmlAttributes if $params['presentation'] == 'thumb' => return html thumb ($params['URLonly'] not present) or thumb uri ($params['URLonly'] is present) if $params['presentation'] == 'full' => return embed object if $params['presentation'] == 'link' => return object link

Parameters

$obj
$obj, object
$params
$params, specific parameters
$htmlAttributes
$htmlAttributes, html attributes

Returns

string
private string
# showAudio( array $obj, array $params, array $htmlAttributes )

html audio output return html or uri for audio $obj, with options $params and html attributes $htmlAttributes if present $params['URLonly'], return $obj uri if $params['presentation'] == 'link' => return html link for $obj if $params['presentation'] == 'full' => return embed object else return html image for $obj (@see HtmlHelper)

html audio output return html or uri for audio $obj, with options $params and html attributes $htmlAttributes if present $params['URLonly'], return $obj uri if $params['presentation'] == 'link' => return html link for $obj if $params['presentation'] == 'full' => return embed object else return html image for $obj (@see HtmlHelper)

Parameters

$obj
$obj, object
$params
$params, specific parameters
$htmlAttributes
$htmlAttributes, html attributes

Returns

string
private string,
# showBEFile( array $obj, array $params, array $htmlAttributes )

html befile output return html or uri for file $obj, with options $params and html attributes $htmlAttributes if present $params['URLonly'], return $obj uri if $params['presentation'] == 'thumb' => return html image for $obj (@see HtmlHelper) else return html link for $obj (@see HtmlHelper)

html befile output return html or uri for file $obj, with options $params and html attributes $htmlAttributes if present $params['URLonly'], return $obj uri if $params['presentation'] == 'thumb' => return html image for $obj (@see HtmlHelper) else return html link for $obj (@see HtmlHelper)

Parameters

$obj
$obj, object
$params
$params, specific parameters
$htmlAttributes
$htmlAttributes, html attributes

Returns

string,
html
private string
# showApplication( array $obj, array $params, array $htmlAttributes )

application show for $obj if $params['presentation'] == 'full' && $obj['application_name'] == 'flash' => return embed flash (@see BeEmbedFlashHelper) if $params['presentation'] == 'thumb' => return html image for $obj (@see HtmlHelper)

application show for $obj if $params['presentation'] == 'full' && $obj['application_name'] == 'flash' => return embed flash (@see BeEmbedFlashHelper) if $params['presentation'] == 'thumb' => return html image for $obj (@see HtmlHelper)

Parameters

$obj
$obj, object
$params
$params, specific parameters
$htmlAttributes
$htmlAttributes, html attributes

Returns

string
private string
# getType( array $obj )

return object model for $obj, getting it from configuration, by object_type_id

return object model for $obj, getting it from configuration, by object_type_id

Parameters

$obj
$obj, object

Returns

string
private string
# getImageSrc( array $obj, array $params )

Return image $obj uri if $params['presentation'] == 'thumb', return image thumb (@see BeThumb Lib)

Return image $obj uri if $params['presentation'] == 'thumb', return image thumb (@see BeThumb Lib)

Parameters

$obj
$obj, object
$params
$params, specific parameters

Returns

string
private mixed
# getProviderHelper( array & $obj )

get provider, if set

get provider, if set

Parameters

$obj

Returns

mixed
string|boolean
private string
# getSourceUrl( array $obj )

Get source url. If $obj has a provider try to retrieve source url If provider doesn't provide source or $obj hasn't a provider use $obj['uri']

Get source url. If $obj has a provider try to retrieve source url If provider doesn't provide source or $obj hasn't a provider use $obj['uri']

Parameters

$obj

Returns

string
the complete url to media
private boolean
# checkURL( string $url )

check whether url is valid

check whether url is valid

Parameters

$url

Returns

boolean
protected string,
# getMediaTypeImage( array $obj )

media type image return path for object type image if BACKEND_APP => try to find image in /webroot/img/iconset, then /webroot/img/

media type image return path for object type image if BACKEND_APP => try to find image in /webroot/img/iconset, then /webroot/img/

Parameters

$obj
$obj, object

Returns

string,
object type image

Methods inherited from AppHelper

getHelper(), oEmbedInfo()

Properties summary

private array $conf

Contains media config

Contains media config

# array()
private array $defaultPresentation

Default output for object type

Default output for object type

# array( 'Image' => 'thumb', 'Video' => 'full', 'Audio' => 'full', 'Application' => 'full', 'BEFile' => 'link' )
private $beThumb
# null
public array $helpers

Included helpers.

Included helpers.

# array('Html', 'BeEmbedFlash', 'BeEmbedHtml5')
BEdita API doc | 4-cactus API documentation generated by ApiGen