Shop_Filter_Controller
in package
Online shop.
Tags
Table of Contents
Properties
- $_aAvailablePropertyTypes : mixed
- $_cacheFilterTableColumns : array<string|int, mixed>
- Cache for _getFilterTableColumns()
- $_cachePriceIDs : array<string|int, mixed>
- Cache for _getPriceIDs()
- $_cachePriceTableColumns : array<string|int, mixed>
- Cache for _getPriceTableColumns()
- $_cachePropertyIDs : array<string|int, mixed>
- Cache for _getPropertyIDs()
- $_oShop : Shop_Model
- $_oShop_Item_Controller : Shop_Item_Controller
Methods
- __construct() : mixed
- Constructor.
- addPrice() : self
- Add price column and index into table
- addProperty() : self
- Add property column and index into table
- checkPropertyExist() : bool
- Check property exist
- createTable() : self
- Create shop filter table
- dropTable() : self
- Remove shop filter table
- fill() : self
- Fill table rows
- getPriceTableName() : string
- Get Prices Table Name
- getTableName() : string
- Get Filter Table Name
- remove() : self
- Remove table rows
- removeProperty() : self
- Remove property column and index from table
- _combinations() : mixed
- _getDefaultValue() : mixed
- Get property default value
- _getFilterTableColumns() : array<string|int, mixed>
- Get a list of filter table fields
- _getPriceIDs() : mixed
- _getPriceSql() : array<string|int, mixed>
- Get price sql string
- _getPriceTableColumns() : array<string|int, mixed>
- Get a list of price table fields
- _getPropertyIDs() : mixed
- _getPropertySql() : array<string|int, mixed>
- Get property sql string
- _insert() : mixed
Properties
$_aAvailablePropertyTypes
protected
mixed
$_aAvailablePropertyTypes
= array(0, 1, 3, 5, 7, 8, 9, 11, 12, 13, 14)
$_cacheFilterTableColumns
Cache for _getFilterTableColumns()
protected
array<string|int, mixed>
$_cacheFilterTableColumns
= \NULL
$_cachePriceIDs
Cache for _getPriceIDs()
protected
array<string|int, mixed>
$_cachePriceIDs
= \NULL
$_cachePriceTableColumns
Cache for _getPriceTableColumns()
protected
array<string|int, mixed>
$_cachePriceTableColumns
= \NULL
$_cachePropertyIDs
Cache for _getPropertyIDs()
protected
array<string|int, mixed>
$_cachePropertyIDs
= \NULL
$_oShop
protected
Shop_Model
$_oShop
= \NULL
$_oShop_Item_Controller
protected
Shop_Item_Controller
$_oShop_Item_Controller
= \NULL
Methods
__construct()
Constructor.
public
__construct(Shop_Model $oShop) : mixed
Parameters
- $oShop : Shop_Model
-
shop
addPrice()
Add price column and index into table
public
addPrice(Shop_Price_Model $oShop_Price) : self
Parameters
- $oShop_Price : Shop_Price_Model
Return values
selfaddProperty()
Add property column and index into table
public
addProperty(Property_Model $oProperty) : self
Parameters
- $oProperty : Property_Model
Return values
selfcheckPropertyExist()
Check property exist
public
checkPropertyExist(int $property_id) : bool
Parameters
- $property_id : int
-
property id
Return values
bool —TRUE|FALSE
createTable()
Create shop filter table
public
createTable() : self
Return values
selfdropTable()
Remove shop filter table
public
dropTable() : self
Return values
selffill()
Fill table rows
public
fill(Shop_Item_Model $oShop_Item) : self
Parameters
- $oShop_Item : Shop_Item_Model
Return values
selfgetPriceTableName()
Get Prices Table Name
public
getPriceTableName() : string
Return values
stringgetTableName()
Get Filter Table Name
public
getTableName() : string
Return values
stringremove()
Remove table rows
public
remove(Shop_Item_Model $oShop_Item) : self
Parameters
- $oShop_Item : Shop_Item_Model
Return values
selfremoveProperty()
Remove property column and index from table
public
removeProperty(Property_Model $oProperty) : self
Parameters
- $oProperty : Property_Model
Return values
self_combinations()
protected
_combinations(mixed $aPV[, mixed $i = 0 ]) : mixed
Parameters
- $aPV : mixed
- $i : mixed = 0
_getDefaultValue()
Get property default value
protected
_getDefaultValue(int $property_id) : mixed
Parameters
- $property_id : int
-
property id
Return values
mixed —int|string
_getFilterTableColumns()
Get a list of filter table fields
protected
_getFilterTableColumns() : array<string|int, mixed>
Return values
array<string|int, mixed>_getPriceIDs()
protected
_getPriceIDs() : mixed
_getPriceSql()
Get price sql string
protected
_getPriceSql(Shop_Price_Model $oShop_Price) : array<string|int, mixed>
Parameters
- $oShop_Price : Shop_Price_Model
Return values
array<string|int, mixed> —array('column' => ..., 'index' => ...)
_getPriceTableColumns()
Get a list of price table fields
protected
_getPriceTableColumns() : array<string|int, mixed>
Return values
array<string|int, mixed>_getPropertyIDs()
protected
_getPropertyIDs() : mixed
_getPropertySql()
Get property sql string
protected
_getPropertySql(Property_Model $oProperty) : array<string|int, mixed>
Parameters
- $oProperty : Property_Model
Return values
array<string|int, mixed> —array('column' => ..., 'index' => ...)
_insert()
protected
_insert(mixed $tableName, mixed $sFilterTableColumnNames, array<string|int, mixed> $aValues) : mixed
Parameters
- $tableName : mixed
- $sFilterTableColumnNames : mixed
- $aValues : array<string|int, mixed>