/** * Constructor. * * @param object $objModule * @param string $strColumn */ public function __construct($objModule, $strColumn = 'main') { parent::__construct($objModule, $strColumn); $this->iso_cumulativeFields = deserialize($this->iso_cumulativeFields); $fields = array(); if (is_array($this->iso_cumulativeFields)) { foreach ($this->iso_cumulativeFields as $k => $v) { $attribute = $v['attribute']; unset($v['attribute']); $fields[$attribute] = $v; } } $this->iso_cumulativeFields = $fields; // Remove setting to prevent override of the module template $this->iso_filterTpl = ''; $this->navigationTpl = $this->navigationTpl ?: 'nav_default'; $this->activeFilters = Isotope::getRequestCache()->getFiltersForModules(array($this->id)); // We cannot show matches if some of our filters are not applicable in SQL $dynamicFields = array_intersect(array_keys($this->iso_cumulativeFields), Attribute::getDynamicAttributeFields()); $this->canShowMatches = empty($dynamicFields); }
/** * Check if filter attribute is dynamic (can't use SQL filter then) * @return bool */ public function isDynamicAttribute() { return in_array($this->arrConfig['attribute'], Attribute::getDynamicAttributeFields()); }