Changeset View
Changeset View
Standalone View
Standalone View
core/units/filters/item_filter_tp.php
Show All 39 Lines | |||||
* @param Array $params | * @param Array $params | ||||
* @return string | * @return string | ||||
* @access protected | * @access protected | ||||
*/ | */ | ||||
protected function ListFilterOptions($params) | protected function ListFilterOptions($params) | ||||
{ | { | ||||
static $cache = Array (); | static $cache = Array (); | ||||
/** @var kDBItem $object */ | |||||
$object = $this->getObject($params); | $object = $this->getObject($params); | ||||
/* @var $object kDBItem */ | |||||
// get item list to be filtered | // get item list to be filtered | ||||
$this->Application->ProcessParsedTag($params['prefix'], 'InitList', $params); | $this->Application->ProcessParsedTag($params['prefix'], 'InitList', $params); | ||||
$tag_processor = $this->Application->recallTagProcessor( $params['prefix'] ); | $tag_processor = $this->Application->recallTagProcessor( $params['prefix'] ); | ||||
$item_list = $tag_processor->GetList($params); | $item_list = $tag_processor->GetList($params); | ||||
$filter_type = $object->GetDBField('FilterType'); | $filter_type = $object->GetDBField('FilterType'); | ||||
$filter_field = $object->GetDBField('FilterField'); | $filter_field = $object->GetDBField('FilterField'); | ||||
▲ Show 20 Lines • Show All 248 Lines • ▼ Show 20 Line(s) | |||||
{ | { | ||||
// range count could be dynamically changed in PrintFilterOptions tag | // range count could be dynamically changed in PrintFilterOptions tag | ||||
$max_value = $this->Application->GetVar('max_range_value'); | $max_value = $this->Application->GetVar('max_range_value'); | ||||
if ( $max_value !== false ) { | if ( $max_value !== false ) { | ||||
$range_count = $max_value / $this->Application->GetVar('range_step'); | $range_count = $max_value / $this->Application->GetVar('range_step'); | ||||
} | } | ||||
else { | else { | ||||
/** @var kDBItem $object */ | |||||
$object = $this->getObject($params); | $object = $this->getObject($params); | ||||
/* @var $object kDBItem */ | |||||
$range_count = $object->GetDBField('RangeCount'); | $range_count = $object->GetDBField('RangeCount'); | ||||
} | } | ||||
return $range_count * $params['factor']; | return $range_count * $params['factor']; | ||||
} | } | ||||
} | } |