UNA
Loading...
Searching...
No Matches
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 ()
 
 getData ($sUrl, $sTheme)
 
 getDataFromApi ($sUrl, $sTheme)
 
- 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)
 
- Static Public Member Functions inherited from iBxDolFactoryObject
static getObjectInstance ($sObject)
 

Protected Attributes

 $_bCssJsAdded = false
 
 $_sTableName = ''
 
- Protected Attributes inherited from BxDolFactoryObject
 $_oDb
 
 $_oTemplate
 
 $_sObject
 
 $_aObject
 

Additional Inherited Members

- Protected Member Functions inherited from BxDolFactoryObject
 __construct ($aObject, $oTemplate=null, $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>';
static getObjectInstance($sObject=false, $oTemplate=false)
Definition BxDolEmbed.php:48

Member Function Documentation

◆ addJsCss()

BxDolEmbed::addJsCss ( )

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

Reimplemented in BxBaseEmbedEmbedly, BxBaseEmbedIframely, and BxBaseEmbedOembed.

◆ addProcessLinkMethod()

BxDolEmbed::addProcessLinkMethod ( )

Execute an initialization JS code

Reimplemented in BxBaseEmbedEmbedly, BxBaseEmbedIframely, and BxBaseEmbedOembed.

◆ 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)

Reimplemented in BxBaseEmbedIframely, BxBaseEmbedOembed, and BxBaseEmbedSystem.

◆ 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: