['filter' => FILTER_UNSAFE_RAW]]; public function __construct($pageCall, $pageParam) { $this->getCategoryFromUrl($pageParam); if (isset($this->category[0])) header('Location: ?areatriggers&filter=ty='.$this->category[0], true, 302); parent::__construct($pageCall, $pageParam); $this->filterObj = new AreaTriggerListFilter($this->_get['filter'] ?? ''); $this->name = Util::ucFirst(Lang::game('areatriggers')); } protected function generateContent() { $this->filterObj->evalCriteria(); $conditions = []; if ($_ = $this->filterObj->getConditions()) $conditions[] = $_; $tabData = []; $trigger = new AreaTriggerList($conditions, ['calcTotal' => true]); if (!$trigger->error) { $tabData['data'] = array_values($trigger->getListviewData()); // create note if search limit was exceeded; overwriting 'note' is intentional if ($trigger->getMatches() > Cfg::get('SQL_LIMIT_DEFAULT')) { $tabData['note'] = sprintf(Util::$tryFilteringEntityString, $trigger->getMatches(), '"'.Lang::game('areatriggers').'"', Cfg::get('SQL_LIMIT_DEFAULT')); $tabData['_truncated'] = 1; } if ($this->filterObj->error) $tabData['_errors'] = 1; } $this->lvTabs[] = [AreaTriggerList::$brickFile, $tabData, 'areatrigger']; } protected function generateTitle() { array_unshift($this->title, $this->name); $form = $this->filterObj->values; if (count($form['ty']) == 1) array_unshift($this->title, Lang::areatrigger('types', $form['ty'][0])); } protected function generatePath() { $form = $this->filterObj->values; if (count($form['ty']) == 1) $this->path[] = $form['ty']; } } ?>