<?php
namespace Modules\Admin\Config\ImportedDocuments\SystemManagement; class Model extends \App\Mvc\Model_ListingAbstract { public function list_execute(\App\Mvc\View\Listing\Members\Params $listingParams) { $filters = $listingParams->getFilters(); $listObj = new \App\EntityList\ImportedDocumentsSystems(); $listObj->setColumns(['code', 'name', 'active', 'addTime']); if ($filters['name']) { $listObj->setFilter('name', 'LIKE', "%{$filters['name']}%"); } if ($filters['code']) { $listObj->setFilter('code', '=', $filters['code']); } if ($filters['active'] == 'active') { $listObj->setFilter('active', '=', '1'); } elseif ($filters['active'] == 'inactive') { $listObj->setFilter('active', '=', '0'); } $listObj = $this->entityList_inheritListingParams($listingParams, $listObj); $this->recordsList = $listObj->exportRecords(); $this->totalRecordsCount = $listObj->getRecordsCount(); } }