Transformer improvements

This commit is contained in:
David Bomba 2020-08-05 12:27:47 +10:00
parent 13cf06b0cd
commit 715fdf5e2d

View File

@ -79,7 +79,10 @@ class CompanyShopProfileTransformer extends EntityTransformer
private function trimCompany($company) private function trimCompany($company)
{ {
$std = new \stdClass;
$trimmed_company_settings = [ $trimmed_company_settings = [
'custom_fields' => $company->custom_fields ?: $std,
'custom_value1' => $company->settings->custom_value1, 'custom_value1' => $company->settings->custom_value1,
'custom_value2' => $company->settings->custom_value2, 'custom_value2' => $company->settings->custom_value2,
'custom_value3' => $company->settings->custom_value3, 'custom_value3' => $company->settings->custom_value3,