@@ 92-98 (lines=7) @@ | ||
89 | && (!is_array($user->{$fieldMethod}()) && !is_object($user->{$fieldMethod}())) |
|
90 | ) { |
|
91 | $data[$column->getName()] = $user->{$fieldMethod}(); |
|
92 | } elseif (method_exists($user, $fieldMethod) |
|
93 | && is_array($user->{$fieldMethod}()) |
|
94 | && array_key_exists('name', $user->{$fieldMethod}()) |
|
95 | && array_key_exists('id', $user->{$fieldMethod}()) |
|
96 | ) { |
|
97 | $data[$column->getName()] = $user->{$fieldMethod}()['name']; |
|
98 | } |
|
99 | elseif (method_exists($user, $fieldMethod) |
|
100 | && is_object($user->{$fieldMethod}()) && method_exists($user->{$fieldMethod}(), 'getName') |
|
101 | ) { |
|
@@ 99-104 (lines=6) @@ | ||
96 | ) { |
|
97 | $data[$column->getName()] = $user->{$fieldMethod}()['name']; |
|
98 | } |
|
99 | elseif (method_exists($user, $fieldMethod) |
|
100 | && is_object($user->{$fieldMethod}()) && method_exists($user->{$fieldMethod}(), 'getName') |
|
101 | ) { |
|
102 | $object = $user->{$fieldMethod}(); |
|
103 | $data[$column->getName()] = $object->getName(); |
|
104 | } |
|
105 | elseif($column->getName() === 'Currency') { |
|
106 | //Todo: Do a pull request about \ZCRMUser::geCurrency() to \ZCRMUser::getCurrency() |
|
107 | $data[$column->getName()] = $user->geCurrency(); |