- 01
 - 02
 - 03
 - 04
 - 05
 - 06
 - 07
 - 08
 - 09
 - 10
 - 11
 - 12
 - 13
 - 14
 - 15
 - 16
 - 17
 - 18
 - 19
 - 20
 - 21
 - 22
 - 23
 
                        public function toArray()
        {
                $that = $this;
                $profile = $this->getProfile();
                return [
                        'sex' => $profile->getSex(),
                        'distance' => (int) $profile->get($profile::FIELD_DISTANCE),
                        'balance' => new Object_Response_Model_User_Balance($profile->get($profile::FIELD_BALANCE)),
 
                        'payments' => call_user_func(function() use ($that) {
                                $return = [];
                                $checkoutTypes = $that->getRelationCheckoutTypes()->find_all()->as_array();
                                foreach($checkoutTypes as $checkoutType) {
                                        if (json_decode($checkoutType->data)[0]->value) {
                                                $return[] = $checkoutType;
                                        }
                                }
                                return $return;
                        }),
                        'vk' => $this->getRelationSocial()->getProfileUrl(),
                        'validate' => $this->getValidate()
                ];
        };
                                 
        
Комментарии (0) RSS
Добавить комментарий