protected function saveValue()
 {
     $this->deleteCurrentRows();
     if (is_null($this->value)) {
         return;
     }
     $vfa816edb83e95bf0c8da580bdfd491ef = array();
     foreach ($this->value as $v3a6d0284e743dc4a9b86f97d6dd1a3bf) {
         if (!$v3a6d0284e743dc4a9b86f97d6dd1a3bf) {
             continue;
         }
         if (is_string($v3a6d0284e743dc4a9b86f97d6dd1a3bf) && strpos($v3a6d0284e743dc4a9b86f97d6dd1a3bf, "|") !== false) {
             $v2e3a8d3f3d1c742f7234c3d6dd74cc3c = explode("|", $v3a6d0284e743dc4a9b86f97d6dd1a3bf);
             foreach ($v2e3a8d3f3d1c742f7234c3d6dd74cc3c as $v9e3669d19b675bd57058fd4664205d2a) {
                 $v9e3669d19b675bd57058fd4664205d2a = trim($v9e3669d19b675bd57058fd4664205d2a);
                 if ($v9e3669d19b675bd57058fd4664205d2a) {
                     $vfa816edb83e95bf0c8da580bdfd491ef[] = $v9e3669d19b675bd57058fd4664205d2a;
                 }
                 unset($v9e3669d19b675bd57058fd4664205d2a);
             }
             unset($v2e3a8d3f3d1c742f7234c3d6dd74cc3c);
             $this->getField()->setFieldTypeId(umiFieldTypesCollection::getInstance()->getFieldTypeByDataType('relation', 1)->getId());
         } else {
             $vfa816edb83e95bf0c8da580bdfd491ef[] = $v3a6d0284e743dc4a9b86f97d6dd1a3bf;
         }
     }
     $this->value = $vfa816edb83e95bf0c8da580bdfd491ef;
     unset($vfa816edb83e95bf0c8da580bdfd491ef);
     $v2817f701d5e1a1181e657251363295fd = 0;
     foreach ($this->value as $v3c6e0b8a9c15224a8228b9a98ca1531d => $v3a6d0284e743dc4a9b86f97d6dd1a3bf) {
         if ($v3a6d0284e743dc4a9b86f97d6dd1a3bf) {
             $v3a6d0284e743dc4a9b86f97d6dd1a3bf = $this->prepareRelationValue($v3a6d0284e743dc4a9b86f97d6dd1a3bf);
             $this->values[$v3c6e0b8a9c15224a8228b9a98ca1531d] = $v3a6d0284e743dc4a9b86f97d6dd1a3bf;
         }
         if (!$v3a6d0284e743dc4a9b86f97d6dd1a3bf) {
             continue;
         }
         $vac5c74b64b4b8352ef2f181affb5ac2a = "INSERT INTO {$this->tableName} (obj_id, field_id, rel_val) VALUES('{$this->object_id}', '{$this->field_id}', '{$v3a6d0284e743dc4a9b86f97d6dd1a3bf}')";
         l_mysql_query($vac5c74b64b4b8352ef2f181affb5ac2a);
         ++$v2817f701d5e1a1181e657251363295fd;
     }
     if (!$v2817f701d5e1a1181e657251363295fd) {
         $this->fillNull();
     }
 }
 protected static function getClassNameByFieldId($v3aabf39f2d943fa886d86dcbbee4d910)
 {
     static $v0fea6a13c52b4d4725368f24b045ca84 = array();
     if (isset($v0fea6a13c52b4d4725368f24b045ca84[$v3aabf39f2d943fa886d86dcbbee4d910]) && !self::$IGNORE_CACHE) {
         return $v0fea6a13c52b4d4725368f24b045ca84[$v3aabf39f2d943fa886d86dcbbee4d910];
     }
     $v06e3d36fa30cea095545139854ad1fb9 = umiFieldsCollection::getInstance()->getField($v3aabf39f2d943fa886d86dcbbee4d910);
     $ve2aeb4e882d60b1eb4b7c8cd97986a28 = $v06e3d36fa30cea095545139854ad1fb9->getFieldTypeId();
     $v833750ac635fcc57dc33ecafe365f9a7 = umiFieldTypesCollection::getInstance()->getFieldType($ve2aeb4e882d60b1eb4b7c8cd97986a28);
     $v5fd6df40d7c4dd7f503475344d8c145c = $v833750ac635fcc57dc33ecafe365f9a7->getDataType();
     $v8f7cd34efac0926458bbd05f62c13001 = array('relation' => 'umiObjectPropertyRelation', 'wysiwyg' => 'umiObjectPropertyWYSIWYG', 'string' => 'umiObjectPropertyString', 'file' => 'umiObjectPropertyFile', 'img_file' => 'umiObjectPropertyImgFile', 'swf_file' => 'umiObjectPropertyImgFile', 'video_file' => 'umiObjectPropertyFile', 'boolean' => 'umiObjectPropertyBoolean', 'int' => 'umiObjectPropertyInt', 'text' => 'umiObjectPropertyText', 'date' => 'umiObjectPropertyDate', 'symlink' => 'umiObjectPropertySymlink', 'price' => 'umiObjectPropertyPrice', 'float' => 'umiObjectPropertyFloat', 'tags' => 'umiObjectPropertyTags', 'password' => 'umiObjectPropertyPassword', 'counter' => 'umiObjectPropertyCounter', 'optioned' => 'umiObjectPropertyOptioned');
     if (isset($v8f7cd34efac0926458bbd05f62c13001[$v5fd6df40d7c4dd7f503475344d8c145c])) {
         return $v0fea6a13c52b4d4725368f24b045ca84[$v3aabf39f2d943fa886d86dcbbee4d910] = $v8f7cd34efac0926458bbd05f62c13001[$v5fd6df40d7c4dd7f503475344d8c145c];
     } else {
         throw new coreException("Unhandled field of type \"{$v5fd6df40d7c4dd7f503475344d8c145c}\"");
     }
 }
Ejemplo n.º 3
0
 public function getDataType()
 {
     $v69552af3a03df9391f70eb1851f817c5 = umiFieldTypesCollection::getInstance();
     return $v69552af3a03df9391f70eb1851f817c5->getFieldType($this->field_type_id)->getDataType();
 }
Ejemplo n.º 4
0
 protected function exportRestriction($v228c63e369a5906eb7f0500a13729edc)
 {
     if (isset($this->exported_restrictions[$v228c63e369a5906eb7f0500a13729edc])) {
         return false;
     }
     $v3dadfaeb46ec74762b37de11fea7605c = baseRestriction::get($v228c63e369a5906eb7f0500a13729edc);
     if (!$v3dadfaeb46ec74762b37de11fea7605c instanceof baseRestriction) {
         return false;
     }
     $vf3ecaaa779127f3ec136cca581bfaf46 = $v3dadfaeb46ec74762b37de11fea7605c->getClassName();
     $vf52176cf6508ff07e507a49978c0fc2f = $v3dadfaeb46ec74762b37de11fea7605c->getTitle();
     $v94757cae63fd3e398c0811a976dd6bbe = $v3dadfaeb46ec74762b37de11fea7605c->getFieldTypeId();
     $v599dcce2998a6b40b1e38e8c6006cb0a = umiFieldTypesCollection::getInstance()->getFieldType($v94757cae63fd3e398c0811a976dd6bbe);
     $v17f71d965fe9589ddbd11caf7182243e = $v599dcce2998a6b40b1e38e8c6006cb0a->getDataType();
     $v96a76ec43956dac431b643cbd544dd08 = $v599dcce2998a6b40b1e38e8c6006cb0a->getIsMultiple();
     $v6896b87ef0ed896869194f78f21380e7 = $this->relations->getOldRestrictionIdRelation($this->source_id, $v228c63e369a5906eb7f0500a13729edc);
     if (!$v6896b87ef0ed896869194f78f21380e7) {
         $this->relations->setRestrictionIdRelation($this->source_id, $v228c63e369a5906eb7f0500a13729edc, $v228c63e369a5906eb7f0500a13729edc);
         $v6896b87ef0ed896869194f78f21380e7 = $v228c63e369a5906eb7f0500a13729edc;
     }
     $vd95679752134a2d9eb61dbd7b91c4bcc = $this->doc->createElement('restriction');
     $vd95679752134a2d9eb61dbd7b91c4bcc->setAttribute('id', $v6896b87ef0ed896869194f78f21380e7);
     $vd95679752134a2d9eb61dbd7b91c4bcc->setAttribute('prefix', $vf3ecaaa779127f3ec136cca581bfaf46);
     $vd95679752134a2d9eb61dbd7b91c4bcc->setAttribute('title', $vf52176cf6508ff07e507a49978c0fc2f);
     $vd95679752134a2d9eb61dbd7b91c4bcc->setAttribute('field-type', $v17f71d965fe9589ddbd11caf7182243e);
     $vd95679752134a2d9eb61dbd7b91c4bcc->setAttribute('is-multiple', $v96a76ec43956dac431b643cbd544dd08);
     foreach ($this->restricted_fields as $v3c6e0b8a9c15224a8228b9a98ca1531d => $v2063c1608d6e0baf80249c42e2be5804) {
         if ($v2063c1608d6e0baf80249c42e2be5804['restriction-id'] == $v228c63e369a5906eb7f0500a13729edc) {
             $v8fa14cdd754f91cc6554c9e71929cce7 = $this->doc->createElement('field');
             $v8fa14cdd754f91cc6554c9e71929cce7->setAttribute('field-name', $v2063c1608d6e0baf80249c42e2be5804['field-name']);
             $v8fa14cdd754f91cc6554c9e71929cce7->setAttribute('type-id', $v2063c1608d6e0baf80249c42e2be5804['type-id']);
             $vd95679752134a2d9eb61dbd7b91c4bcc->appendChild($v8fa14cdd754f91cc6554c9e71929cce7);
         }
     }
     $this->restrictions_container->appendChild($vd95679752134a2d9eb61dbd7b91c4bcc);
     $this->exported_restrictions[$v228c63e369a5906eb7f0500a13729edc] = $v6896b87ef0ed896869194f78f21380e7;
     $this->position++;
     return true;
 }
Ejemplo n.º 5
0
 protected function collection()
 {
     switch ($this->requestedType) {
         case 'object':
             return umiObjectsCollection::getInstance();
         case 'page':
             return umiHierarchy::getInstance();
         case 'object-type':
             return umiObjectTypesCollection::getInstance();
         case 'hierarchy-type':
             return umiHierarchyTypesCollection::getInstance();
         case 'field':
             return umiFieldsCollection::getInstance();
         case 'field-type':
             return umiFieldTypesCollection::getInstance();
         case 'domain':
             return domainsCollection::getInstance();
         case 'lang':
             return langsCollection::getInstance();
     }
 }
Ejemplo n.º 6
0
 private function getDataByFieldId($v3aabf39f2d943fa886d86dcbbee4d910)
 {
     if ($v06e3d36fa30cea095545139854ad1fb9 = umiFieldsCollection::getInstance()->getField($v3aabf39f2d943fa886d86dcbbee4d910)) {
         $v1e3f04102267eaf5e8d0ca424fd5c561 = $v06e3d36fa30cea095545139854ad1fb9->getFieldTypeId();
         if ($v519504d7d4beb745dac24ccfb6c1d7c9 = umiFieldTypesCollection::getInstance()->getFieldType($v1e3f04102267eaf5e8d0ca424fd5c561)) {
             if ($v17f71d965fe9589ddbd11caf7182243e = $v519504d7d4beb745dac24ccfb6c1d7c9->getDataType()) {
                 return umiFieldType::getDataTypeDB($v17f71d965fe9589ddbd11caf7182243e);
             } else {
                 return false;
             }
         } else {
             return false;
         }
     } else {
         return false;
     }
 }
Ejemplo n.º 7
0
 public function autoDetectFilters(umiSelection $sel, $object_type_id)
 {
     if (is_null(getRequest('search-all-text')) == false) {
         $searchStrings = getRequest('search-all-text');
         if (is_array($searchStrings)) {
             foreach ($searchStrings as $searchString) {
                 if ($searchString) {
                     $sel->searchText($searchString);
                 }
             }
         }
     }
     if (array_key_exists("fields_filter", $_REQUEST)) {
         $cmsController = cmsController::getInstance();
         $data_module = $cmsController->getModule("data");
         if (!$data_module) {
             throw new publicException("Need data module installed to use dynamic filters");
         }
         $sel->setPropertyFilter();
         $type = umiObjectTypesCollection::getInstance()->getType($object_type_id);
         $order_filter = getRequest('fields_filter');
         if (!is_array($order_filter)) {
             return false;
         }
         foreach ($order_filter as $field_name => $value) {
             if ($field_name == "name") {
                 $data_module->applyFilterName($sel, $value);
                 continue;
             }
             if ($field_id = $type->getFieldId($field_name)) {
                 $this->isSelectionFiltered = true;
                 $field = umiFieldsCollection::getInstance()->getField($field_id);
                 $field_type_id = $field->getFieldTypeId();
                 $field_type = umiFieldTypesCollection::getInstance()->getFieldType($field_type_id);
                 $data_type = $field_type->getDataType();
                 switch ($data_type) {
                     case "text":
                         $data_module->applyFilterText($sel, $field, $value);
                         break;
                     case "wysiwyg":
                         $data_module->applyFilterText($sel, $field, $value);
                         break;
                     case "string":
                         $data_module->applyFilterText($sel, $field, $value);
                         break;
                     case "tags":
                         $tmp = array_extract_values($value);
                         if (empty($tmp)) {
                             break;
                         }
                     case "boolean":
                         $data_module->applyFilterBoolean($sel, $field, $value);
                         break;
                     case "int":
                         $data_module->applyFilterInt($sel, $field, $value);
                         break;
                     case "symlink":
                     case "relation":
                         $data_module->applyFilterRelation($sel, $field, $value);
                         break;
                     case "float":
                         $data_module->applyFilterFloat($sel, $field, $value);
                         break;
                     case "price":
                         $emarket = $cmsController->getModule('emarket');
                         if ($emarket instanceof def_module) {
                             $defaultCurrency = $emarket->getDefaultCurrency();
                             $currentCurrency = $emarket->getCurrentCurrency();
                             $prices = $emarket->formatCurrencyPrice($value, $defaultCurrency, $currentCurrency);
                             foreach ($value as $index => $void) {
                                 $value[$index] = getArrayKey($prices, $index);
                             }
                         }
                         $data_module->applyFilterPrice($sel, $field, $value);
                         break;
                     case "file":
                     case "img_file":
                     case "swf_file":
                     case "boolean":
                         $data_module->applyFilterInt($sel, $field, $value);
                         break;
                     case "date":
                         $data_module->applyFilterDate($sel, $field, $value);
                         break;
                     default:
                         break;
                 }
             } else {
                 continue;
             }
         }
     } else {
         return false;
     }
 }
Ejemplo n.º 8
0
 protected function importRestriction(DOMElement $vcaf9b6b99962bf5c2264824231d7a40c)
 {
     $v61ce6a78cb3c8547fed20990c92edfe3 = $vcaf9b6b99962bf5c2264824231d7a40c->getAttribute('id');
     $vd5d3db1765287eef77d7927cc956f50a = $vcaf9b6b99962bf5c2264824231d7a40c->hasAttribute('title') ? $vcaf9b6b99962bf5c2264824231d7a40c->getAttribute('title') : null;
     $v851f5ac9941d720844d143ed9cfcf60a = $vcaf9b6b99962bf5c2264824231d7a40c->hasAttribute('prefix') ? $vcaf9b6b99962bf5c2264824231d7a40c->getAttribute('prefix') : null;
     $v17f71d965fe9589ddbd11caf7182243e = $vcaf9b6b99962bf5c2264824231d7a40c->hasAttribute('field-type') ? $vcaf9b6b99962bf5c2264824231d7a40c->getAttribute('field-type') : null;
     $vce495ab8d79db0d37413d8e95b54e606 = $vcaf9b6b99962bf5c2264824231d7a40c->getAttribute('is-multiple') == 1 || $vcaf9b6b99962bf5c2264824231d7a40c->getAttribute('is-multiple') == "multiple";
     if (!strlen($v61ce6a78cb3c8547fed20990c92edfe3)) {
         $this->reportError($this->getLabel('label-cannot-create-restriction') . " \"{$vd5d3db1765287eef77d7927cc956f50a}\" " . $this->getLabel('label-with-empty-id'));
         return false;
     }
     $vdb6d9b451b818ccc9a449383f2f0c450 = umiFieldTypesCollection::getInstance();
     $v519504d7d4beb745dac24ccfb6c1d7c9 = $vdb6d9b451b818ccc9a449383f2f0c450->getFieldTypeByDataType($v17f71d965fe9589ddbd11caf7182243e, $vce495ab8d79db0d37413d8e95b54e606);
     $v94757cae63fd3e398c0811a976dd6bbe = $v519504d7d4beb745dac24ccfb6c1d7c9->getId();
     $ve2fa538867c3830a859a5b17ab24644b = false;
     $v228c63e369a5906eb7f0500a13729edc = false;
     if (!$vd5d3db1765287eef77d7927cc956f50a) {
         $vd5d3db1765287eef77d7927cc956f50a = $v61ce6a78cb3c8547fed20990c92edfe3;
     }
     if (baseRestriction::find($v851f5ac9941d720844d143ed9cfcf60a, $v94757cae63fd3e398c0811a976dd6bbe)) {
         $v228c63e369a5906eb7f0500a13729edc = baseRestriction::find($v851f5ac9941d720844d143ed9cfcf60a, $v94757cae63fd3e398c0811a976dd6bbe)->getId();
         if ($v228c63e369a5906eb7f0500a13729edc != $this->relations->getNewRestrictionIdRelation($this->source_id, $v61ce6a78cb3c8547fed20990c92edfe3)) {
             $this->relations->setRestrictionIdRelation($this->source_id, $v61ce6a78cb3c8547fed20990c92edfe3, $v228c63e369a5906eb7f0500a13729edc);
         }
     }
     if (!$v228c63e369a5906eb7f0500a13729edc) {
         $v228c63e369a5906eb7f0500a13729edc = $this->relations->getNewRestrictionIdRelation($this->source_id, $v61ce6a78cb3c8547fed20990c92edfe3);
     }
     if (!$v228c63e369a5906eb7f0500a13729edc) {
         $v228c63e369a5906eb7f0500a13729edc = baseRestriction::add($v851f5ac9941d720844d143ed9cfcf60a, $vd5d3db1765287eef77d7927cc956f50a, $v94757cae63fd3e398c0811a976dd6bbe);
         $this->relations->setRestrictionIdRelation($this->source_id, $v61ce6a78cb3c8547fed20990c92edfe3, $v228c63e369a5906eb7f0500a13729edc);
         $ve2fa538867c3830a859a5b17ab24644b = true;
     }
     $v3dadfaeb46ec74762b37de11fea7605c = baseRestriction::get($v228c63e369a5906eb7f0500a13729edc);
     if (!$v3dadfaeb46ec74762b37de11fea7605c instanceof baseRestriction) {
         $this->reportError($this->getLabel('label-cannot-detect-restriction') . " \"{$vd5d3db1765287eef77d7927cc956f50a}\"");
         return false;
     }
     if ($ve2fa538867c3830a859a5b17ab24644b) {
         $this->created_restrictions++;
         $this->writeLog($this->getLabel('label-restriction') . " \"" . $v3dadfaeb46ec74762b37de11fea7605c->getTitle() . "\" (" . $v61ce6a78cb3c8547fed20990c92edfe3 . ") " . $this->getLabel('label-has-been-created-n'));
     }
     $vd05b6ed7d2345020440df396d6da7f73 = $vcaf9b6b99962bf5c2264824231d7a40c->getElementsByTagName('field');
     foreach ($vd05b6ed7d2345020440df396d6da7f73 as $v39b7b22d803b1a0270c9c6c6f8a3b4cb) {
         $v6adb6b0ad1941d569b23e089910c5e74 = $v39b7b22d803b1a0270c9c6c6f8a3b4cb->getAttribute('field-name');
         $v2741adf691b2acf0359a6a73234bc605 = $v39b7b22d803b1a0270c9c6c6f8a3b4cb->getAttribute('type-id');
         $v87306dd4235ed712ebc07fe169b76f83 = $this->relations->getNewTypeIdRelation($this->source_id, $v2741adf691b2acf0359a6a73234bc605);
         if (!$v87306dd4235ed712ebc07fe169b76f83) {
             continue;
         }
         $v3aabf39f2d943fa886d86dcbbee4d910 = umiObjectTypesCollection::getInstance()->getType($v87306dd4235ed712ebc07fe169b76f83)->getFieldId(self::translateName($v6adb6b0ad1941d569b23e089910c5e74), false);
         if (!$v3aabf39f2d943fa886d86dcbbee4d910) {
             umiObjectTypesCollection::getInstance()->getType($v87306dd4235ed712ebc07fe169b76f83)->getFieldId($v6adb6b0ad1941d569b23e089910c5e74, false);
         }
         $v06e3d36fa30cea095545139854ad1fb9 = umiFieldsCollection::getInstance()->getField($v3aabf39f2d943fa886d86dcbbee4d910);
         if (!$v06e3d36fa30cea095545139854ad1fb9 instanceof umiField) {
             $this->reportError($this->getLabel('label-cannot-set-restriction-for-field') . " \"{$v6adb6b0ad1941d569b23e089910c5e74}\": " . $this->getLabel('label-cannot-detect-field'));
             continue;
         }
         $v06e3d36fa30cea095545139854ad1fb9->setRestrictionId($v228c63e369a5906eb7f0500a13729edc);
         $v06e3d36fa30cea095545139854ad1fb9->setIsUpdated();
         $this->writeLog($this->getLabel('label-restriction') . " \"" . $v3dadfaeb46ec74762b37de11fea7605c->getTitle() . "\" " . $this->getLabel('label-has-been-set-for-field') . " \"{$v6adb6b0ad1941d569b23e089910c5e74}\"");
     }
     return $v3dadfaeb46ec74762b37de11fea7605c;
 }
Ejemplo n.º 9
0
 protected function getFieldTypeId($v17f71d965fe9589ddbd11caf7182243e, $v96a76ec43956dac431b643cbd544dd08 = false)
 {
     $v3fa9d6639f24f9bb4bf81ac6bdbdbc8c = umiFieldTypesCollection::getInstance()->getFieldTypesList();
     foreach ($v3fa9d6639f24f9bb4bf81ac6bdbdbc8c as $v519504d7d4beb745dac24ccfb6c1d7c9) {
         if ($v519504d7d4beb745dac24ccfb6c1d7c9->getDataType() == $v17f71d965fe9589ddbd11caf7182243e && $v519504d7d4beb745dac24ccfb6c1d7c9->getIsMultiple() == $v96a76ec43956dac431b643cbd544dd08) {
             return $v519504d7d4beb745dac24ccfb6c1d7c9->getId();
         }
     }
     return false;
 }
Ejemplo n.º 10
0
 public function search($category_id = false, $group_names = "", $template = "default", $type_id = false)
 {
     if (!$template) {
         $template = "default";
     }
     if ($type_id === false) {
         $category_id = $this->analyzeRequiredPath($category_id);
         if (!$category_id) {
             return "";
         }
     }
     list($template_block, $template_block_empty, $template_block_line, $template_block_line_text, $template_block_line_relation, $template_block_line_item_relation, $template_block_line_item_relation_separator, $template_block_line_price, $template_block_line_boolean, $template_block_line_symlink) = self::loadTemplates("catalog/" . $template, "search_block", "search_block_empty", "search_block_line", "search_block_line_text", "search_block_line_relation", "search_block_line_item_relation", "search_block_line_item_relation_separator", "search_block_line_price", "search_block_line_boolean", "search_block_line_symlink");
     $block_arr = array();
     if ($type_id === false) {
         $type_id = umiHierarchy::getInstance()->getDominantTypeId($category_id);
     }
     if (is_null($type_id)) {
         return "";
     }
     if (!($type = umiObjectTypesCollection::getInstance()->getType($type_id))) {
         trigger_error("Failed to load type", E_USER_WARNING);
         return "";
     }
     $fields = array();
     $groups = array();
     $lines = array();
     $group_names = trim($group_names);
     if ($group_names) {
         $group_names_arr = explode(" ", $group_names);
         foreach ($group_names_arr as $group_name) {
             if (!($fields_group = $type->getFieldsGroupByName($group_name))) {
             } else {
                 $groups[] = $fields_group;
             }
         }
     } else {
         $groups = $type->getFieldsGroupsList();
     }
     $lines_all = array();
     $groups_arr = array();
     foreach ($groups as $fields_group) {
         $fields = $fields_group->getFields();
         $group_block = array();
         $group_block['attribute:name'] = $fields_group->getName();
         $group_block['attribute:title'] = $fields_group->getTitle();
         $lines = array();
         foreach ($fields as $field_id => $field) {
             if (!$field->getIsVisible()) {
                 continue;
             }
             if (!$field->getIsInFilter()) {
                 continue;
             }
             $line_arr = array();
             $field_type_id = $field->getFieldTypeId();
             $field_type = umiFieldTypesCollection::getInstance()->getFieldType($field_type_id);
             $data_type = $field_type->getDataType();
             $line = array();
             switch ($data_type) {
                 case "relation":
                     $line = $this->parseSearchRelation($field, $template_block_line_relation, $template_block_line_item_relation, $template_block_line_item_relation_separator);
                     break;
                 case "text":
                     $line = $this->parseSearchText($field, $template_block_line_text);
                     break;
                 case "date":
                     $line = $this->parseSearchDate($field, $template_block_line_text);
                     break;
                 case "string":
                     $line = $this->parseSearchText($field, $template_block_line_text);
                     break;
                 case "wysiwyg":
                     $line = $this->parseSearchText($field, $template_block_line_text);
                     break;
                 case "float":
                 case "price":
                     $line = $this->parseSearchPrice($field, $template_block_line_price);
                     break;
                 case "int":
                     $line = $this->parseSearchInt($field, $template_block_line_text);
                     break;
                 case "boolean":
                     $line = $this->parseSearchBoolean($field, $template_block_line_boolean);
                     break;
                 case "symlink":
                     $line = $this->parseSearchSymlink($field, $template_block_line_symlink, $category_id);
                     break;
                 default:
                     $line = "[search filter for \"{$data_type}\" not specified]";
                     break;
             }
             if (self::isXSLTResultMode()) {
                 if (is_array($line)) {
                     $line['attribute:data-type'] = $data_type;
                 }
             }
             $line_arr['void:selector'] = $line;
             if (self::isXSLTResultMode()) {
                 $lines[] = $line;
             } else {
                 $lines[] = $tmp = self::parseTemplate($template_block_line, $line_arr);
                 $lines_all[] = $tmp;
             }
         }
         if (empty($lines)) {
             continue;
         }
         $group_block['nodes:field'] = $lines;
         $groups_arr[] = $group_block;
     }
     $block_arr['void:items'] = $block_arr['void:lines'] = $lines_all;
     $block_arr['nodes:group'] = $groups_arr;
     $block_arr['attribute:category_id'] = $category_id;
     if (!$groups_arr && !$lines && !$this->isXSLTResultMode()) {
         return $template_block_empty;
     }
     return self::parseTemplate($template_block, $block_arr);
 }
 /**
  * TODO PHPDoc
  * Enter description here ...
  * @param unknown_type $template
  * @param umiField $field
  * @param unknown_type $object
  */
 public function renderEditField($template, umiField $field, $object = false)
 {
     $field_type_id = $field->getFieldTypeId();
     $field_type = umiFieldTypesCollection::getInstance()->getFieldType($field_type_id);
     $is_multiple = $field_type->getIsMultiple();
     $data_type = $field_type->getDataType();
     switch ($data_type) {
         case "counter":
         case "int":
             $res = $this->renderEditFieldInt($field, $is_multiple, $object, $template);
             $data_type = "int";
             break;
         case "price":
         case "float":
             $res = $this->renderEditFieldInt($field, $is_multiple, $object, $template);
             break;
         case "string":
             $res = $this->renderEditFieldString($field, $is_multiple, $object, $template);
             break;
         case "date":
             $res = $this->renderEditFieldDate($field, $is_multiple, $object, $template);
             break;
         case "password":
             $res = $this->renderEditFieldPassword($field, $is_multiple, $object, $template);
             break;
         case "relation":
             $res = $this->renderEditFieldRelation($field, $is_multiple, $object, $template);
             break;
         case "symlink":
             $res = $this->renderEditFieldSymlink($field, $is_multiple, $object, $template);
             break;
         case "img_file":
             $res = $this->renderEditFieldImageFile($field, $is_multiple, $object, $template);
             break;
         case "video_file":
         case "swf_file":
             $res = $this->renderEditFieldFile($field, $is_multiple, $object, $template);
             break;
         case "file":
             $res = $this->renderEditFieldFile($field, $is_multiple, $object, $template);
             break;
         case "text":
             $res = $this->renderEditFieldText($field, $is_multiple, $object, $template);
             break;
         case "wysiwyg":
             $res = $this->renderEditFieldWYSIWYG($field, $is_multiple, $object, $template);
             break;
         case "boolean":
             $res = $this->renderEditFieldBoolean($field, $is_multiple, $object, $template);
             break;
         case "tags":
             $res = $this->renderEditFieldTags($field, $is_multiple, $object, $template);
             break;
         case "optioned":
             $res = $this->renderEditFieldOptioned($field, $is_multiple, $object, $template);
             break;
         default:
             $res = "";
     }
     if ($res === false) {
         return NULL;
     }
     if (!def_module::isXSLTResultMode()) {
         $required = $field->getIsRequired();
         $res = def_module::parseTemplate($res, array('required' => $required ? 'required' : '', 'required_asteriks' => $required ? '<i>*</i>' : ''));
     } else {
         $res['attribute:type'] = $data_type;
         $res['attribute:id'] = $field->getId();
         if ($field->getIsRequired()) {
             $res['attribute:required'] = 'required';
         }
         if ($tip = $field->getTip()) {
             $res['attribute:tip'] = $tip;
         }
     }
     return $res;
 }
Ejemplo n.º 12
0
 public function getFieldTypesList()
 {
     $v3fa9d6639f24f9bb4bf81ac6bdbdbc8c = umiFieldTypesCollection::getInstance()->getFieldTypesList();
     $v691d502cfd0e0626cd3b058e5682ad1c = array();
     foreach ($v3fa9d6639f24f9bb4bf81ac6bdbdbc8c as $v1e3f04102267eaf5e8d0ca424fd5c561 => $v519504d7d4beb745dac24ccfb6c1d7c9) {
         $ve253bed1357afcefc5fadfbc92f9eb97 = array();
         $ve253bed1357afcefc5fadfbc92f9eb97['attribute:id'] = $v1e3f04102267eaf5e8d0ca424fd5c561;
         $ve253bed1357afcefc5fadfbc92f9eb97['node:name'] = $v519504d7d4beb745dac24ccfb6c1d7c9->getName();
         $v691d502cfd0e0626cd3b058e5682ad1c[] = $ve253bed1357afcefc5fadfbc92f9eb97;
     }
     $vfca1bff8ad8b3a8585abfb0ad523ba42 = array();
     $vfca1bff8ad8b3a8585abfb0ad523ba42['nodes:item'] = $v691d502cfd0e0626cd3b058e5682ad1c;
     return $vfca1bff8ad8b3a8585abfb0ad523ba42;
 }
Ejemplo n.º 13
0
 protected function addPropertiesInfo($vcaf9b6b99962bf5c2264824231d7a40c, $vf5e638cc78dd325906c1298a0c21fb6b, $v9a09b4dfda82e3e665e31092d1c3ec8d)
 {
     $v74693d2fc58b46bd06410f278e39aa71 = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('properties');
     $vf5e638cc78dd325906c1298a0c21fb6b->appendChild($v74693d2fc58b46bd06410f278e39aa71);
     $vdb0f6f37ebeb6ea09489124345af2a45 = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('group');
     $v74693d2fc58b46bd06410f278e39aa71->appendChild($vdb0f6f37ebeb6ea09489124345af2a45);
     $vdb0f6f37ebeb6ea09489124345af2a45->setAttribute('name', 'newGroup');
     foreach ($vcaf9b6b99962bf5c2264824231d7a40c as $v3c6e0b8a9c15224a8228b9a98ca1531d => $v2063c1608d6e0baf80249c42e2be5804) {
         if (!strlen($v2063c1608d6e0baf80249c42e2be5804)) {
             continue;
         }
         $v2063c1608d6e0baf80249c42e2be5804 = strtr($v2063c1608d6e0baf80249c42e2be5804, array("&" => "&amp;", "<" => "&lt;", ">" => "&gt;"));
         if ($this->names[$v3c6e0b8a9c15224a8228b9a98ca1531d] == 'id') {
             $vf5e638cc78dd325906c1298a0c21fb6b->setAttribute('id', $v2063c1608d6e0baf80249c42e2be5804);
             continue;
         }
         if ($this->names[$v3c6e0b8a9c15224a8228b9a98ca1531d] == 'is-active') {
             $vf5e638cc78dd325906c1298a0c21fb6b->setAttribute('is-active', $v2063c1608d6e0baf80249c42e2be5804);
             continue;
         }
         if ($this->names[$v3c6e0b8a9c15224a8228b9a98ca1531d] == 'is-visible') {
             $vf5e638cc78dd325906c1298a0c21fb6b->setAttribute('is-visible', $v2063c1608d6e0baf80249c42e2be5804);
             continue;
         }
         if ($this->names[$v3c6e0b8a9c15224a8228b9a98ca1531d] == 'is-deleted') {
             $vf5e638cc78dd325906c1298a0c21fb6b->setAttribute('is-deleted', $v2063c1608d6e0baf80249c42e2be5804);
             continue;
         }
         if ($this->names[$v3c6e0b8a9c15224a8228b9a98ca1531d] == 'name') {
             $vb068931cc450442b63f5b3d276ea4297 = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('name', $v2063c1608d6e0baf80249c42e2be5804);
             $vf5e638cc78dd325906c1298a0c21fb6b->appendChild($vb068931cc450442b63f5b3d276ea4297);
             continue;
         }
         if ($this->names[$v3c6e0b8a9c15224a8228b9a98ca1531d] == 'type-id' || $this->names[$v3c6e0b8a9c15224a8228b9a98ca1531d] == 'parent-id') {
             continue;
         }
         if ($this->names[$v3c6e0b8a9c15224a8228b9a98ca1531d] == 'template-id') {
             $v66f6181bcb4cff4cd38fbc804a036db6 = templatesCollection::getInstance()->getTemplate($v2063c1608d6e0baf80249c42e2be5804);
             if ($v66f6181bcb4cff4cd38fbc804a036db6 instanceof template) {
                 $v4f2afc9c4099ee1f39c9f551123e54bd = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('template', $v66f6181bcb4cff4cd38fbc804a036db6->getFilename());
                 $vf5e638cc78dd325906c1298a0c21fb6b->appendChild($v4f2afc9c4099ee1f39c9f551123e54bd);
                 $v4f2afc9c4099ee1f39c9f551123e54bd->setAttribute('id', $v2063c1608d6e0baf80249c42e2be5804);
             }
             continue;
         }
         $v1a8db4c996d8ed8289da5f957879ab94 = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('property');
         $vdb0f6f37ebeb6ea09489124345af2a45->appendChild($v1a8db4c996d8ed8289da5f957879ab94);
         $v870b60148237c1452dfb337fdd19c314 = $this->types[$v3c6e0b8a9c15224a8228b9a98ca1531d];
         $vce495ab8d79db0d37413d8e95b54e606 = false;
         if ($v870b60148237c1452dfb337fdd19c314 == 'multiple-relation') {
             $v870b60148237c1452dfb337fdd19c314 = 'relation';
             $vce495ab8d79db0d37413d8e95b54e606 = true;
         }
         if ($v870b60148237c1452dfb337fdd19c314 == "tags") {
             $vce495ab8d79db0d37413d8e95b54e606 = true;
         }
         $v833750ac635fcc57dc33ecafe365f9a7 = umiFieldTypesCollection::getInstance()->getFieldTypeByDataType($v870b60148237c1452dfb337fdd19c314, $vce495ab8d79db0d37413d8e95b54e606);
         if ($v833750ac635fcc57dc33ecafe365f9a7 instanceof umiFieldType) {
             $v84aa805a9d919179ab8f8b24376e2ed7 = $v833750ac635fcc57dc33ecafe365f9a7->getName();
         } else {
             throw new coreException('Wrong datatype "' . $v870b60148237c1452dfb337fdd19c314 . '" is given for property "' . $this->names[$v3c6e0b8a9c15224a8228b9a98ca1531d] . '"');
         }
         $v1a8db4c996d8ed8289da5f957879ab94->setAttribute('name', $this->names[$v3c6e0b8a9c15224a8228b9a98ca1531d]);
         $v1a8db4c996d8ed8289da5f957879ab94->setAttribute('title', $this->titles[$v3c6e0b8a9c15224a8228b9a98ca1531d]);
         $v1a8db4c996d8ed8289da5f957879ab94->setAttribute('type', $v870b60148237c1452dfb337fdd19c314);
         if ($vce495ab8d79db0d37413d8e95b54e606) {
             $v1a8db4c996d8ed8289da5f957879ab94->setAttribute('multiple', 'multiple');
         }
         $v1a8db4c996d8ed8289da5f957879ab94->setAttribute('visible', '1');
         $v1a8db4c996d8ed8289da5f957879ab94->setAttribute('allow-runtime-add', '1');
         $v599dcce2998a6b40b1e38e8c6006cb0a = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('type');
         $v1a8db4c996d8ed8289da5f957879ab94->appendChild($v599dcce2998a6b40b1e38e8c6006cb0a);
         $v599dcce2998a6b40b1e38e8c6006cb0a->setAttribute('data-type', $v870b60148237c1452dfb337fdd19c314);
         $v599dcce2998a6b40b1e38e8c6006cb0a->setAttribute('name', $v84aa805a9d919179ab8f8b24376e2ed7);
         $vd5d3db1765287eef77d7927cc956f50a = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('title', $this->titles[$v3c6e0b8a9c15224a8228b9a98ca1531d]);
         $v1a8db4c996d8ed8289da5f957879ab94->appendChild($vd5d3db1765287eef77d7927cc956f50a);
         if ($v870b60148237c1452dfb337fdd19c314 == 'relation') {
             $v9602b952913db0444a013e59553f377e = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('value');
             $v1a8db4c996d8ed8289da5f957879ab94->appendChild($v9602b952913db0444a013e59553f377e);
             $vf09cc7ee3a9a93273f4b80601cafb00c = explode(',', $v2063c1608d6e0baf80249c42e2be5804);
             foreach ($vf09cc7ee3a9a93273f4b80601cafb00c as $vf35f97ea7b20a3701c7cb122497e89a9) {
                 $v447b7147e84be512208dcc0995d67ebc = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('item');
                 $v447b7147e84be512208dcc0995d67ebc->setAttribute('name', $vf35f97ea7b20a3701c7cb122497e89a9);
                 $v9602b952913db0444a013e59553f377e->appendChild($v447b7147e84be512208dcc0995d67ebc);
             }
         } elseif ($v870b60148237c1452dfb337fdd19c314 == 'tags') {
             $vf09cc7ee3a9a93273f4b80601cafb00c = explode(',', $v2063c1608d6e0baf80249c42e2be5804);
             foreach ($vf09cc7ee3a9a93273f4b80601cafb00c as $vf35f97ea7b20a3701c7cb122497e89a9) {
                 $v447b7147e84be512208dcc0995d67ebc = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('value', trim($vf35f97ea7b20a3701c7cb122497e89a9));
                 $v1a8db4c996d8ed8289da5f957879ab94->appendChild($v447b7147e84be512208dcc0995d67ebc);
             }
             $v9602b952913db0444a013e59553f377e = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('combined', $v2063c1608d6e0baf80249c42e2be5804);
             $v1a8db4c996d8ed8289da5f957879ab94->appendChild($v9602b952913db0444a013e59553f377e);
         } else {
             $v9602b952913db0444a013e59553f377e = $v9a09b4dfda82e3e665e31092d1c3ec8d->createElement('value', $v2063c1608d6e0baf80249c42e2be5804);
             $v1a8db4c996d8ed8289da5f957879ab94->appendChild($v9602b952913db0444a013e59553f377e);
         }
     }
 }
Ejemplo n.º 14
0
 public function saveAddedFieldData($ve62e4d22f2d8630f6e44e2b7c3f70ddc)
 {
     $v0e939a4ffd3aacd724dd3b50147b4353 = $ve62e4d22f2d8630f6e44e2b7c3f70ddc['group-id'];
     $v94757cae63fd3e398c0811a976dd6bbe = $ve62e4d22f2d8630f6e44e2b7c3f70ddc['type-id'];
     $vcaf9b6b99962bf5c2264824231d7a40c = getRequest('data');
     $vd5d3db1765287eef77d7927cc956f50a = getArrayKey($vcaf9b6b99962bf5c2264824231d7a40c, 'title');
     $vb068931cc450442b63f5b3d276ea4297 = getArrayKey($vcaf9b6b99962bf5c2264824231d7a40c, 'name');
     $ve1c6c9ef2fcbe75f26f815c4ef2e60b4 = getArrayKey($vcaf9b6b99962bf5c2264824231d7a40c, 'is_visible');
     $v1e3f04102267eaf5e8d0ca424fd5c561 = getArrayKey($vcaf9b6b99962bf5c2264824231d7a40c, 'field_type_id');
     $v051369818a8073bba5feeb0e957eb308 = getArrayKey($vcaf9b6b99962bf5c2264824231d7a40c, 'guide_id');
     $v5fa2ecd1dc485ead330e65903d19650a = getArrayKey($vcaf9b6b99962bf5c2264824231d7a40c, 'in_search');
     $ve4a2ed2dde6e8354ae6f321744843084 = getArrayKey($vcaf9b6b99962bf5c2264824231d7a40c, 'in_filter');
     $v6a2139364f96787c8ce1bbb0070b898c = getArrayKey($vcaf9b6b99962bf5c2264824231d7a40c, 'tip');
     $v2a9d32d17ad47ac15c87d2e7c96d0e69 = getArrayKey($vcaf9b6b99962bf5c2264824231d7a40c, 'is_required');
     $v6b1a57fa235477758817df3c91158006 = getArrayKey($vcaf9b6b99962bf5c2264824231d7a40c, 'restriction_id');
     $v0e8133eb006c0f85ed9444ae07a60842 = umiObjectTypesCollection::getInstance();
     $vd05b6ed7d2345020440df396d6da7f73 = umiFieldsCollection::getInstance();
     $v69552af3a03df9391f70eb1851f817c5 = umiFieldTypesCollection::getInstance();
     $v599dcce2998a6b40b1e38e8c6006cb0a = $v0e8133eb006c0f85ed9444ae07a60842->getType($v94757cae63fd3e398c0811a976dd6bbe);
     if ($v599dcce2998a6b40b1e38e8c6006cb0a instanceof umiObjectType) {
         if ($v599dcce2998a6b40b1e38e8c6006cb0a->getFieldId($vb068931cc450442b63f5b3d276ea4297)) {
             throw new publicAdminException(getLabel('error-non-unique-field-name'));
         }
     }
     $v19dad066c23a79c33b2975590e364a5a = $v69552af3a03df9391f70eb1851f817c5->getFieldType($v1e3f04102267eaf5e8d0ca424fd5c561);
     $v983560f49ede87197144b22c810a5087 = $v19dad066c23a79c33b2975590e364a5a->getDataType();
     if ($v983560f49ede87197144b22c810a5087 == "relation" && $v051369818a8073bba5feeb0e957eb308 == 0) {
         $v051369818a8073bba5feeb0e957eb308 = self::getAutoGuideId($vd5d3db1765287eef77d7927cc956f50a);
     }
     if ($v983560f49ede87197144b22c810a5087 == "optioned" && $v051369818a8073bba5feeb0e957eb308 == 0) {
         $va98d7ac1b7459c54b19858e934794517 = $v0e8133eb006c0f85ed9444ae07a60842->getTypeIdByGUID('emarket-itemoption');
         $v051369818a8073bba5feeb0e957eb308 = self::getAutoGuideId($vd5d3db1765287eef77d7927cc956f50a, $va98d7ac1b7459c54b19858e934794517);
     }
     $v3aabf39f2d943fa886d86dcbbee4d910 = false;
     $va08f2aee9de301619776deb6fee83e50 = $v599dcce2998a6b40b1e38e8c6006cb0a->getParentId();
     $v3f5af10cbb47cb1b6fcf196befc17b95 = $v0e8133eb006c0f85ed9444ae07a60842->getSubTypesList($va08f2aee9de301619776deb6fee83e50);
     foreach ($v3f5af10cbb47cb1b6fcf196befc17b95 as $veb2c84964aa55a68255b7466cd21b62c) {
         if ($veb2c84964aa55a68255b7466cd21b62c == $v94757cae63fd3e398c0811a976dd6bbe) {
             continue;
         }
         $v4ae5fdeb89c7a5a5daf33112bda3f82b = $v0e8133eb006c0f85ed9444ae07a60842->getType($veb2c84964aa55a68255b7466cd21b62c);
         if ($v4ae5fdeb89c7a5a5daf33112bda3f82b instanceof umiObjectType == false) {
             continue;
         }
         if ($v6270c3e00735121953b8585fd836af43 = $v4ae5fdeb89c7a5a5daf33112bda3f82b->getFieldId($vb068931cc450442b63f5b3d276ea4297)) {
             $vd3b250b73d77cb502490809548ef475e = $vd05b6ed7d2345020440df396d6da7f73->getField($v6270c3e00735121953b8585fd836af43);
             if ($vd3b250b73d77cb502490809548ef475e instanceof umiField == false) {
                 continue;
             }
             if ($vd3b250b73d77cb502490809548ef475e->getFieldTypeId() == $v1e3f04102267eaf5e8d0ca424fd5c561 && $vd3b250b73d77cb502490809548ef475e->getTitle() == $vd5d3db1765287eef77d7927cc956f50a) {
                 $v3aabf39f2d943fa886d86dcbbee4d910 = $v6270c3e00735121953b8585fd836af43;
                 break;
             }
         }
     }
     $v6a8e34c52627084d431e3b4c6edebc2d = $v0e8133eb006c0f85ed9444ae07a60842->getSubTypesList($v94757cae63fd3e398c0811a976dd6bbe);
     foreach ($v6a8e34c52627084d431e3b4c6edebc2d as $vdff2729c2ea51cc1722c9df2117032bd) {
         $va0100f1c342300cc8f1c583d2b4ad9ee = $v0e8133eb006c0f85ed9444ae07a60842->getType($vdff2729c2ea51cc1722c9df2117032bd);
         if ($va0100f1c342300cc8f1c583d2b4ad9ee instanceof umiObjectType == false) {
             continue;
         }
         if ($ve6b31d5d6cb774ba4498162622b2575a = $va0100f1c342300cc8f1c583d2b4ad9ee->getFieldId($vb068931cc450442b63f5b3d276ea4297)) {
             $v9efe917b2c0f25687fa4b5e2a36edd5c = $vd05b6ed7d2345020440df396d6da7f73->getField($ve6b31d5d6cb774ba4498162622b2575a);
             if ($v9efe917b2c0f25687fa4b5e2a36edd5c instanceof umiField == false) {
                 continue;
             }
             if ($v9efe917b2c0f25687fa4b5e2a36edd5c->getFieldTypeId() == $v1e3f04102267eaf5e8d0ca424fd5c561 && $v9efe917b2c0f25687fa4b5e2a36edd5c->getTitle() == $vd5d3db1765287eef77d7927cc956f50a) {
                 $v3aabf39f2d943fa886d86dcbbee4d910 = $ve6b31d5d6cb774ba4498162622b2575a;
                 break;
             }
         }
     }
     if ($v3aabf39f2d943fa886d86dcbbee4d910 === false) {
         $v3aabf39f2d943fa886d86dcbbee4d910 = $vd05b6ed7d2345020440df396d6da7f73->addField($vb068931cc450442b63f5b3d276ea4297, $vd5d3db1765287eef77d7927cc956f50a, $v1e3f04102267eaf5e8d0ca424fd5c561, $ve1c6c9ef2fcbe75f26f815c4ef2e60b4, false, false);
         $v06e3d36fa30cea095545139854ad1fb9 = $vd05b6ed7d2345020440df396d6da7f73->getField($v3aabf39f2d943fa886d86dcbbee4d910);
         $v06e3d36fa30cea095545139854ad1fb9->setGuideId($v051369818a8073bba5feeb0e957eb308);
         $v06e3d36fa30cea095545139854ad1fb9->setIsInSearch($v5fa2ecd1dc485ead330e65903d19650a);
         $v06e3d36fa30cea095545139854ad1fb9->setIsInFilter($ve4a2ed2dde6e8354ae6f321744843084);
         $v06e3d36fa30cea095545139854ad1fb9->setTip($v6a2139364f96787c8ce1bbb0070b898c);
         $v06e3d36fa30cea095545139854ad1fb9->setIsRequired($v2a9d32d17ad47ac15c87d2e7c96d0e69);
         $v06e3d36fa30cea095545139854ad1fb9->setRestrictionId($v6b1a57fa235477758817df3c91158006);
         $v06e3d36fa30cea095545139854ad1fb9->commit();
     }
     if ($v599dcce2998a6b40b1e38e8c6006cb0a instanceof umiObjectType) {
         $vdb0f6f37ebeb6ea09489124345af2a45 = $v599dcce2998a6b40b1e38e8c6006cb0a->getFieldsGroup($v0e939a4ffd3aacd724dd3b50147b4353);
         if ($vdb0f6f37ebeb6ea09489124345af2a45 instanceof umiFieldsGroup) {
             $vdb0f6f37ebeb6ea09489124345af2a45->attachField($v3aabf39f2d943fa886d86dcbbee4d910);
             $veeeb23fbd23e52a6a6ff78b9f18cbc4e = $vdb0f6f37ebeb6ea09489124345af2a45->getName();
             $vadce578d04ed03c31f6ac59451fcf8e4 = $v0e8133eb006c0f85ed9444ae07a60842->getChildClasses($v94757cae63fd3e398c0811a976dd6bbe);
             $v7dabf5c198b0bab2eaa42bb03a113e55 = sizeof($vadce578d04ed03c31f6ac59451fcf8e4);
             for ($v865c0c0b4ab0e063e5caa3387c1a8741 = 0; $v865c0c0b4ab0e063e5caa3387c1a8741 < $v7dabf5c198b0bab2eaa42bb03a113e55; $v865c0c0b4ab0e063e5caa3387c1a8741++) {
                 $vd4fd255f51559df00de5424b64292413 = $vadce578d04ed03c31f6ac59451fcf8e4[$v865c0c0b4ab0e063e5caa3387c1a8741];
                 $v793536b8480511c5e2975eba32738d1d = $v0e8133eb006c0f85ed9444ae07a60842->getType($vd4fd255f51559df00de5424b64292413);
                 if ($v793536b8480511c5e2975eba32738d1d instanceof umiObjectType) {
                     if ($v793536b8480511c5e2975eba32738d1d->getFieldId($vb068931cc450442b63f5b3d276ea4297) == $v3aabf39f2d943fa886d86dcbbee4d910) {
                         continue;
                     }
                     $vb19a4f118986f0631ceac2d003e1f4a3 = $v793536b8480511c5e2975eba32738d1d->getFieldsGroupByName($veeeb23fbd23e52a6a6ff78b9f18cbc4e);
                     if ($vb19a4f118986f0631ceac2d003e1f4a3 instanceof umiFieldsGroup) {
                         $vb19a4f118986f0631ceac2d003e1f4a3->attachField($v3aabf39f2d943fa886d86dcbbee4d910, true);
                     } else {
                         throw new coreException("Can't find umiFieldsGroup #{$veeeb23fbd23e52a6a6ff78b9f18cbc4e} in umiObjectType #{$vd4fd255f51559df00de5424b64292413}");
                     }
                 } else {
                     throw new coreException("Can't find umiObjectType #{$vd4fd255f51559df00de5424b64292413}");
                 }
             }
             return $v3aabf39f2d943fa886d86dcbbee4d910;
         } else {
             throw new coreException("Can't find umiFieldsGroup #{$v0e939a4ffd3aacd724dd3b50147b4353}");
         }
     } else {
         throw new coreException("Can't find umiObjectType #{$v94757cae63fd3e398c0811a976dd6bbe}");
     }
 }