UNA
Loading...
Searching...
No Matches
BxDolCover Class Reference
Inheritance diagram for BxDolCover:
BxDolFactory iBxDolSingleton BxBaseCover BxTemplCover

Public Member Functions

 __clone ()
 
 isEnabled ()
 
 isCover ()
 
 set ($aOptions, $sTemplateName=false)
 
 setCoverImageUrl ($mixedCoverImage)
 
 setCoverClass ($sClass)
 

Static Public Member Functions

static getInstance ($oTemplate=false)
 
static getCoverImageUrl ($mixedImage)
 
- Static Public Member Functions inherited from iBxDolSingleton
static getInstance ()
 

Protected Attributes

 $_aOptions = array()
 
 $_sTemplateName = 'cover.html'
 
 $_sTemplateNameEmpty = 'cover_empty.html'
 
 $_sCoverImageUrl = false
 
 $_aOptiondDefault = array()
 

Detailed Description

Cover.

It displays cover area for different pages, usually it have background image, text and some buttons on it.

Example of usage

Setting cover:

$oCover = BxDolCover::getInstance(); // get object instance
if ($oCover) // check if Cover is available for using
$oCover->set (array( // set cover with default template
'title' => 'Hello World!',
));
static getInstance($oTemplate=false)
Definition BxDolCover.php:79

Constructor & Destructor Documentation

◆ __construct()

BxDolCover::__construct ( )
protected

Reimplemented from BxDolFactory.

Member Function Documentation

◆ __clone()

BxDolCover::__clone ( )

Prevent cloning the instance

◆ getCoverImageUrl()

static BxDolCover::getCoverImageUrl ( $mixedImage)
static

Get cover image URL by descriptive array.

Parameters
mixed$mixedImage- image descriptive array.
Returns
string with image URL or false on error.

◆ getInstance()

static BxDolCover::getInstance ( $oTemplate = false)
static

Get Cover object instance

Returns
object instance or false on error

◆ isCover()

BxDolCover::isCover ( )

Determine whether cover is already set for the page or not.

◆ isEnabled()

BxDolCover::isEnabled ( )

Determine whether cover is enabled globally or not.

◆ set()

BxDolCover::set ( $aOptions,
$sTemplateName = false )

Set custom cover options

Parameters
$aOptions- cover options, default template supports the following: title. For more info
See also
template/cover.html
Parameters
$sTemplateName- optional template name

Hooks:

'system', 'set_cover' - hook in set cover

  • $unit_name - equals account
  • $action - equals set_cover
  • $object_id - not used
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:
    • options - [array] by ref, cover options, default template supports the following: title, can be overridden in hook processing
    • override_result - [string] by ref, template name, can be overridden in hook processing
    • cover - [object] object cover
      HOOKS
      'system', 'set_cover' - hook in set cover

◆ setCoverClass()

BxDolCover::setCoverClass ( $sClass)

Set cover area class

◆ setCoverImageUrl()

BxDolCover::setCoverImageUrl ( $mixedCoverImage)

Set cover image url for default cover template

Parameters
$mixedCoverImageUrl- cover image url, or array with file id and storage or transcoder object:
array('id' => 12, 'object' => 'sample');
// or
array('id' => 21, 'transcoder' => 'sample');

Hooks:

'system', 'set_cover' - hook in set cover

  • $unit_name - equals system
  • $action - equals set_cover_image
  • $object_id - not used
  • $sender_id - not used
  • $extra_params - array of additional params with the following array keys:
    • cover_image - [string] by ref, cover image url, or array with file id and storage or transcoder object, can be overridden in hook processing
    • cover - [object] object cover
      HOOKS
      hook-system-set_cover_image

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