예제 #1
0
파일: Type.php 프로젝트: Maxlander/shixi
 function getPropertyVariablesToAssign()
 {
     $profile_field_as_dv = '';
     if (isset($this->property_info['profile_field_as_dv']) && $this->property_info['profile_field_as_dv'] != '') {
         if (!empty($this->property_info['user_sid'])) {
             $userSID = $this->property_info['user_sid'];
         } else {
             $userSID = SJB_UserManager::getCurrentUserSID();
         }
         if ($this->property_info['parentID']) {
             if (SJB_UserManager::issetFieldByName($this->property_info['parentID'] . "_" . $this->property_info['profile_field_as_dv'])) {
                 $profile_field_as_dv = SJB_UserManager::getSystemPropertyValueByObjectSID('users', $userSID, $this->property_info['parentID'] . "_" . $this->property_info['profile_field_as_dv']);
             }
         } else {
             $profile_field_as_dv = SJB_UserManager::getSystemPropertyValueByObjectSID('users', $userSID, $this->property_info['profile_field_as_dv']);
         }
     }
     return array('id' => $this->property_info['id'], 'value' => $this->property_info['value'] !== null ? SJB_HelperFunctions::getClearVariablesToAssign($this->property_info['value']) : null, 'default_value' => $this->property_info['default_value'], 'profile_field_as_dv' => $profile_field_as_dv, 'hidden' => $this->property_info['hidden']);
 }
예제 #2
0
파일: GeoType.php 프로젝트: Maxlander/shixi
 function getPropertyVariablesToAssign()
 {
     $profileFieldAsDv = '';
     if (isset($this->property_info['profile_field_as_dv']) && $this->property_info['profile_field_as_dv'] != '') {
         if (!empty($this->property_info['user_sid'])) {
             $userSID = $this->property_info['user_sid'];
         } else {
             $userSID = SJB_UserManager::getCurrentUserSID();
         }
         if ($this->property_info['parentID']) {
             if (SJB_UserManager::issetFieldByName($this->property_info['parentID'] . '_' . $this->property_info['profile_field_as_dv'])) {
                 $profileFieldAsDv = SJB_UserManager::getSystemPropertyValueByObjectSID('users', $userSID, $this->property_info['parentID'] . '_' . $this->property_info['profile_field_as_dv']);
             }
         } else {
             $profileFieldAsDv = SJB_UserManager::getSystemPropertyValueByObjectSID('users', $userSID, $this->property_info['profile_field_as_dv']);
         }
     }
     return array('id' => $this->property_info['id'], 'useAutocomplete' => $this->property_info['use_autocomplete'], 'type' => $this->property_info['type'], 'isClassifieds' => $this->property_info['is_classifieds'], 'value' => SJB_HelperFunctions::getClearVariablesToAssign($this->property_info['value']), 'default_value' => $this->property_info['default_value'], 'profile_field_as_dv' => $profileFieldAsDv, 'hidden' => $this->property_info['hidden']);
 }