UNA
BxDolEmbed Class Reference
Inheritance diagram for BxDolEmbed:
BxDolFactoryObject BxDolFactory iBxDolFactoryObject BxBaseEmbedEmbedly BxBaseEmbedIframely BxBaseEmbedOembed BxBaseEmbedSystem BxTemplEmbedEmbedly BxTemplEmbedIframely BxTemplEmbedOembed BxTemplEmbedSystem

Public Member Functions

 getLinkHTML ($sLink, $sTitle='', $sMaxWidth='')
 
 addProcessLinkMethod ()
 
 addJsCss ()
 
- Public Member Functions inherited from BxDolFactoryObject
 getObjectName ()
 

Static Public Member Functions

static getObjectInstance ($sObject=false, $oTemplate=false)
 
- Static Public Member Functions inherited from BxDolFactoryObject
static getObjectInstanceByClassNames ($sObject, $oTemplate, $sClassName, $sDbClassName)
 

Detailed Description

Embed provider.

Create an embed from a link.

Creating the Editor object:

Add record to 'sys_objects_embeds' table:

  • object: name of the embed object, in the format: vendor prefix, underscore, module prefix, underscore, internal identifier or nothing
  • title: title of the embed provider, dmay be isplayed in the Studio.
  • override_class_name: user defined class name which is derived from one of base embed provider classes.
  • override_class_file: the location of the user defined class, leave it empty if class is located in system folders.

Example of usage

Generate HTML for a link which will be converted to an embed later:

$oEmbed = BxDolEmbed::getObjectInstance(); // get default embed object instance
if ($oEmbed) // check if embed provider is available for using
echo $oEmbed->getLinkHTML ('https://una.io', 'UNA.IO'); // output HTML which will be automatically converted into embed upon page load
else
echo '<a href="https://una.io">UNA.IO</a>';

Member Function Documentation

◆ addJsCss()

BxDolEmbed::addJsCss ( )

Add css/js files which are needed for embed display and functionality.

◆ addProcessLinkMethod()

BxDolEmbed::addProcessLinkMethod ( )

Execute an initialization JS code

◆ getLinkHTML()

BxDolEmbed::getLinkHTML (   $sLink,
  $sTitle = '',
  $sMaxWidth = '' 
)

Print HTML which will be automatically converted into embed upon page load

Parameters
$sLink- link
$sTitle- title or use link for the title if omitted
$sMaxWidth- try to restrict max width of embed (works in supported embed providers only)

◆ getObjectInstance()

static BxDolEmbed::getObjectInstance (   $sObject = false,
  $oTemplate = false 
)
static

Get embed provider object instance by object name

Parameters
$sObjectobject name
Returns
object instance or false on error

The documentation for this class was generated from the following file: