<?php
 namespace App\ReportsData\EntityFields; class Office extends \App\ReportsData\EntityFields\GeneralAbstract { protected function getDbTableName() { global $DBTRd_offices; return $DBTRd_offices; } protected function getCustomValues($fieldName) { switch ($fieldName) { case 'country': return new Country($this->values['countryCode']); case 'city': return new City($this->values['cityId']); case 'defaultBankAccount': return new AgencyBankAccount($this->values['idDefaultBankAccount']); case 'addUser': return new User($this->values['idAddUser']); case 'updateUser': return new User($this->values['idUpdateUser']); default: return parent::getCustomValues($fieldName); } } protected function processDefaultValues() { $this->values['processedRemarks'] = ($this->values['processedRemarks'])?json_decode($this->values['processedRemarks'], true):[]; } } 