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