<?php
namespace Modules\Admin\Config\ClientInvoices\CopyInvoiceRemarksFromService; class Model extends \App\Mvc\Model_ListingAbstract { public function list_execute(\App\Mvc\View\Listing\Members\Params $listingParams) { $list = []; foreach (\App\Config\CopyInvoiceRemarksFromService::getAdmin()->getAll() as $id=>$rule) { $list[$id] = [ 'id' => $id, 'serviceRemarkVars' => $rule['serviceRemarkVars'], 'invoiceRemarkFormat' => $rule['invoiceRemarkFormat'], ]; } $this->totalRecordsCount = count($list); $this->recordsList = $list; } }