Exemple #1
0
 function getPropertyVariablesToAssign()
 {
     $propertyVariables = parent::getPropertyVariablesToAssign();
     $profileFieldAsDv = SJB_Array::get($propertyVariables, 'profile_field_as_dv');
     if ($profileFieldAsDv && !isset($this->property_info['parentID'])) {
         $fieldValue = SJB_UserProfileFieldManager::getListItemValueBySID($profileFieldAsDv);
         if ($fieldValue) {
             $listingListItemSID = SJB_ListingFieldManager::getListItemSIDByValue($fieldValue, SJB_Array::get($this->property_info, 'sid'));
             $propertyVariables['profile_field_as_dv'] = $listingListItemSID;
         }
     }
     $defaultValue = SJB_Array::get($propertyVariables, 'default_value');
     if ($defaultValue == 'default_country') {
         $propertyVariables['default_value'] = SJB_Settings::getSettingByName('default_country');
     }
     $propertyVariables['hidden'] = $this->property_info['hidden'];
     $newPropertyVariables = array('list_values' => $this->list_values, 'caption' => $this->property_info['caption'], 'sort_by_alphabet' => $this->property_info['sort_by_alphabet']);
     return array_merge($newPropertyVariables, $propertyVariables);
 }