No Matches
BxDolFeature Class Reference
Inheritance diagram for BxDolFeature:
BxDolObject BxDolFactory iBxDolReplaceable BxBaseFeature BxTemplFeature

Public Member Functions

 actionFeature ()
 actionGetFeatureBy ()
 isAllowedFeature ($isPerformAction=false)
 msgErrAllowedFeature ()
 isUndo ()
- Public Member Functions inherited from BxDolObject
 init ($iId)
 getSystemId ()
 getSystemName ()
 getSystemInfo ()
 getId ()
 setId ($iId)
 isEnabled ()
 isPerformed ($iObjectId, $iAuthorId, $iAuthorIp=0)
 getVote ($iObjectId=0, $bForceGet=false)
 getTrack ($iObjectId, $iAuthorId)
 getConditions ($sMainTable, $sMainField)
 getConditionsTrack ($sMainTable, $sMainField, $iAuthorId=0)
 getSqlParts ($sMainTable, $sMainField)
 getSqlPartsTrack ($sMainTable, $sMainField, $iAuthorId=0)
 getSqlPartsTrackAuthor ($sMainTable, $sMainField, $iObjectId=0)
 addMarkers ($aMarkers)
 getElementAPI ($aParams=[])
 getCounterAPI ($aParams=[])
 getQueryObject ()
 checkAction ($sAction, $isPerformAction=false)
 checkActionErrorMsg ($sAction)
 onObjectDelete ($iObjectId=0)

Static Public Member Functions

static getObjectInstance ($sSys, $iId, $iInit=true)
static & getSystems ()
- Static Public Member Functions inherited from BxDolObject
static pruning ()

Protected Member Functions

 __construct ($sSystem, $iId, $iInit=true, $oTemplate=false)
 _doFeature ()
 _getIconDoFeature ($bPerformed)
 _getTitleDoFeature ($bPerformed)
- Protected Member Functions inherited from BxDolObject
 _getAuthorId ()
 _getAuthorPassword ()
 _getAuthorIp ()
 _getAuthorInfo ($iAuthorId=0)
 _getAuthorObject ($iAuthorId=0)
 _trigger ()
 _triggerValue ($iValue)
 _replaceMarkers ($mixed)
 _prepareParamsData ($aParams)
 _getRequestParamsData ($aKeys=array())
 _prepareRequestParamsData ($aParams, $aParamsAdd=array())
 _getTmplContentElementBlock ()
 _getTmplContentElementInline ()
 _getTmplContentDoAction ()
 _getTmplContentDoActionLabel ()
 _getTmplContentCounter ()
 _getTmplContentCounterLabel ()

Protected Attributes

- Protected Attributes inherited from BxDolObject
 $_oTemplate = null
 $_oQuery = null
 $_bApi = false
 $_iId = 0
 $_sSystem = ''
 $_aSystem = array()
 $_aMarkers = array ()
 $_sTmplContentElementBlock = ''
 $_sTmplContentElementInline = ''
 $_sTmplContentDoActionLabel = ''
 $_sTmplContentCounter = ''
 $_sTmplContentCounterLabel = ''

Detailed Description

Track any object feature automatically

Add record to sys_object_feature table to track object feature, to record feature just create this class instance with your object id, for example:

BxDolFeature::getObjectInstance('my_system', 25); // 25 - is object id
static getObjectInstance($sSys, $iId, $iInit=true)
Definition BxDolFeature.php:61

Description of sys_object_feature table fields:

`name` - system name, it is better to use unique module prefix here, lowercase and all spaces are underscored
`table_track` - table to track feature
`is_on` - is the system activated
`trigger_table` - table where you need to update feature field
`trigger_field_id` - table field id to unique determine object
`trigger_field_count` - table field where the featuring date is stored
`class_name` - your custom class name, if you overrride default class
`class_file` - your custom class path

Constructor & Destructor Documentation

◆ __construct()

BxDolFeature::__construct ( $sSystem,
$iInit = true,
$oTemplate = false )

Reimplemented from BxDolObject.

Member Function Documentation

◆ _doFeature()

BxDolFeature::_doFeature ( )

Internal functions


'feature', 'undo' - hook on cancel feature

  • $unit_name - equals feature
  • $action - equals undo
  • $object_id - report id
  • $sender_id - profile_id for feature's author
  • $extra_params - array of additional params with the following array keys:


'feature', 'do' - hook on feature

  • $unit_name - equals feature
  • $action - equals do
  • $object_id - report id
  • $sender_id - profile_id for feature's author
  • $extra_params - array of additional params with the following array keys:
    • object_system - [string] system name, ex: bx_posts
    • object_id - [int] feature object id
    • object_author_id - [int] author's profile_id for feature object_id
      'feature', 'do' - hook on feature

◆ actionFeature()

BxDolFeature::actionFeature ( )

Actions functions

◆ getObjectInstance()

static BxDolFeature::getObjectInstance ( $sSys,
$iInit = true )

get feature object instanse

$sSysfeature object name
$iIdassociated content id, where feature is available
$iInitperform initialization
null on error, or ready to use class instance

◆ getSystems()

static & BxDolFeature::getSystems ( )

Reimplemented from BxDolObject.

◆ isAllowedFeature()

BxDolFeature::isAllowedFeature ( $isPerformAction = false)

Permissions functions

◆ isUndo()

BxDolFeature::isUndo ( )

Auxiliary functions

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