UNA
Loading...
Searching...
No Matches
BxDolFileHandler Class Reference
Inheritance diagram for BxDolFileHandler:
BxDolFactory iBxDolFactoryObject BxBaseFileHandler BxBaseFileHandlerCodeViewer BxBaseFileHandlerGoogleViewer BxBaseFileHandlerImagesViewer BxBaseFileHandlerMsViewer BxBaseFileHandlerSoundsViewer BxBaseFileHandlerVideosViewer BxTemplFileHandlerCodeViewer BxTemplFileHandlerGoogleViewer BxTemplFileHandlerImagesViewer BxTemplFileHandlerMsViewer BxTemplFileHandlerSoundsViewer BxTemplFileHandlerVideosViewer

Public Member Functions

 display ($sFileUrl, $aFile)
 
 isActive ()
 

Static Public Member Functions

static getObjectInstance ($sObject)
 
static getObjectInstanceByFile ($sFileName)
 

Protected Member Functions

 __construct ($aObject)
 

Protected Attributes

 $_sObject
 
 $_aObject
 

Detailed Description

File preview object, it's used to preview different files in browser which browse usually doesn't support.

Adding new files handler:

Add record to 'sys_objects_file_handlers' table:

  • object: name of the file handler object, in the format: vendor prefix, underscore, module prefix, underscore, internal identifier or nothing; for example: bx_abode_pdf - custom file handler from Abode to display PDF files in browser.
  • title: file handler title
  • override_class_name: user defined class name which is derived from one of base file handler class.
  • override_class_file: the location of the user defined class, leave it empty if class is located in system folders.

Example of usage

Display file preview:

$oFileHandler = BxDolFileHandler::getObjectInstanceByFile('hello.pdf'); // get file preview class
if ($oFileHandler) // check if preview is available for gived file
echo $oFileHandler->display (); // output HTML which will automatically show file preview
static getObjectInstanceByFile($sFileName)
Definition BxDolFileHandler.php:88

Constructor & Destructor Documentation

◆ __construct()

BxDolFileHandler::__construct ( $aObject)
protected

Constructor

Parameters
$aObjectarray of file handler options

Member Function Documentation

◆ display()

◆ getObjectInstance()

static BxDolFileHandler::getObjectInstance ( $sObject)
static

Get file handler object instance by object name

Parameters
$sObjectobject name
Returns
object instance or false on error

Implements iBxDolFactoryObject.

◆ getObjectInstanceByFile()

static BxDolFileHandler::getObjectInstanceByFile ( $sFileName)
static

Get file handler object instance by file name

Parameters
$sFileNamefile name
Returns
object instance or false on error

◆ isActive()

BxDolFileHandler::isActive ( )

Check if file preview is available


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