UNA
Loading...
Searching...
No Matches
BxDolCategory Class Reference
Inheritance diagram for BxDolCategory:
BxDolFactory iBxDolFactoryObject BxBaseCategory BxTemplCategory BxForumCategory

Public Member Functions

 getObjectName ()
 
 getSearchObject ()
 
 setSearchCondition ($oSearchResult, $mixedCategory)
 
 getItemsNum ($sCategoryValue, $aParams=[])
 

Static Public Member Functions

static getObjectInstance ($sObject=false)
 
static getObjectInstanceByFormAndList ($sObjectForm, $sListName)
 

Protected Member Functions

 __construct ($aObject)
 

Protected Attributes

 $_sObject
 
 $_aObject
 

Detailed Description

Category object, it can make regular form lists to act as categories by making it clickable and display search results with all contents with the same category. Also it provides services to list all categories with number if items in each category.

Creating the Category object:

Add record to 'sys_objects_category' table:

  • object: name of the category object, in the format: vendor prefix, underscore, module prefix, underscore, internal identifier or nothing;
  • search_object: associated search object to display search results in
  • form_object: form object which displays this category, so category will be transformed to the clickable url
  • list_name: form list name which values are used to populate categories from
  • table: table where category value is stores
  • field: table field name where category value is stored
  • join: custom SQL JOIN to use when getting number of items in the particular category (filter inactive items here)
  • where: custom SQL WHERE to use when getting number of items in the particular category (filter inactive items here)
  • override_class_name: user defined class name which is derived from 'Templ' class.
  • override_class_file: the location of the user defined class, leave it empty if class is located in system folders.

Constructor & Destructor Documentation

◆ __construct()

BxDolCategory::__construct ( $aObject)
protected

Constructor

Parameters
$aObjectarray of editor options

Member Function Documentation

◆ getItemsNum()

BxDolCategory::getItemsNum ( $sCategoryValue,
$aParams = [] )

Get number of items in the specified category

Parameters
$sCategoryValuecategory value
Returns
number

◆ getObjectInstance()

static BxDolCategory::getObjectInstance ( $sObject = false)
static

Get category object instance by object name

Parameters
$sObjectobject name
Returns
object instance or false on error

Implements iBxDolFactoryObject.

◆ getObjectInstanceByFormAndList()

static BxDolCategory::getObjectInstanceByFormAndList ( $sObjectForm,
$sListName )
static

Get category object instance by form object and list name

Parameters
$sObjectFormform object name @patam $sListName list name
Returns
object instance or false on error

◆ getObjectName()

BxDolCategory::getObjectName ( )

Get object name

◆ getSearchObject()

BxDolCategory::getSearchObject ( )

Get search object associated with category object

◆ setSearchCondition()

BxDolCategory::setSearchCondition ( $oSearchResult,
$mixedCategory )

Set condition for search results object for category object

Parameters
$oSearchResultsearch results object
$mixedCategorycategory

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