mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Core/Cleanup
* move DBType Filter base to its own file under components * modernize class and its children
This commit is contained in:
@@ -25,10 +25,11 @@ class ObjectsPage extends GenericPage
|
||||
public function __construct($pageCall, $pageParam)
|
||||
{
|
||||
$this->getCategoryFromUrl($pageParam);
|
||||
$this->filterObj = new GameObjectListFilter(false, ['parentCats' => $this->category]);
|
||||
|
||||
parent::__construct($pageCall, $pageParam);
|
||||
|
||||
$this->filterObj = new GameObjectListFilter($this->_get['filter'] ?? '', ['parentCats' => $this->category]);
|
||||
|
||||
$this->name = Util::ucFirst(Lang::game('objects'));
|
||||
$this->subCat = $pageParam ? '='.$pageParam : '';
|
||||
}
|
||||
@@ -45,13 +46,7 @@ class ObjectsPage extends GenericPage
|
||||
if ($this->category)
|
||||
$conditions[] = ['typeCat', (int)$this->category[0]];
|
||||
|
||||
// recreate form selection
|
||||
$this->filter = $this->filterObj->getForm();
|
||||
$this->filter['query'] = $this->_get['filter'];
|
||||
$this->filter['initData'] = ['init' => 'objects'];
|
||||
|
||||
if ($x = $this->filterObj->getSetCriteria())
|
||||
$this->filter['initData']['sc'] = $x;
|
||||
$this->filterObj->evalCriteria();
|
||||
|
||||
if ($_ = $this->filterObj->getConditions())
|
||||
$conditions[] = $_;
|
||||
|
||||
Reference in New Issue
Block a user