<?php
 namespace Modules\Admin\ActivityDomains; 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\ActivityDomains(); $listObj->setColumns(['name', 'idCategory', 'idAddUser', 'addTime']); if ($filters['text']) { $listObj->setFilter('name', 'LIKE', "%{$filters['text']}%"); } if ($filters['categoryName']['id']) { $listObj->setFilter('idCategory', '=', $filters['categoryName']['id']); } $listObj = $this->entityList_inheritListingParams($listingParams, $listObj); $this->recordsList = $listObj->exportRecords(); $this->totalRecordsCount = $listObj->getRecordsCount(); } } 