public function translateProperties(iUmiFieldsGroup $vdb0f6f37ebeb6ea09489124345af2a45, iUmiObject $va8cfde6331bd59eb2ac96f8911c4b666)
 {
     $v47db2588331bbe530c80dd001fc60aed = $vdb0f6f37ebeb6ea09489124345af2a45->getId();
     $va2b861d0e7719d9108522aacfd4181bc = $vdb0f6f37ebeb6ea09489124345af2a45->getName();
     $v033db9a44bb2ef53effec0ac7c905c8c = $vdb0f6f37ebeb6ea09489124345af2a45->getTitle();
     $v71ea3b11aebda17ad80b6499a6ab6fb0 = array();
     $v71ea3b11aebda17ad80b6499a6ab6fb0['attribute:id'] = $v47db2588331bbe530c80dd001fc60aed;
     $v71ea3b11aebda17ad80b6499a6ab6fb0['attribute:name'] = $va2b861d0e7719d9108522aacfd4181bc;
     $v71ea3b11aebda17ad80b6499a6ab6fb0['title'] = $v033db9a44bb2ef53effec0ac7c905c8c;
     $vd05b6ed7d2345020440df396d6da7f73 = $vdb0f6f37ebeb6ea09489124345af2a45->getFields();
     $v71ea3b11aebda17ad80b6499a6ab6fb0['nodes:property'] = array();
     $v865c0c0b4ab0e063e5caa3387c1a8741 = 0;
     $vb116c0edc58650200e8613da6ced1228 = false;
     foreach ($vd05b6ed7d2345020440df396d6da7f73 as $v945100186b119048837b9859c2c46410 => $v06e3d36fa30cea095545139854ad1fb9) {
         $v972bf3f05d14ffbdb817bef60638ff00 = $v06e3d36fa30cea095545139854ad1fb9->getName();
         $v1a8db4c996d8ed8289da5f957879ab94 = $va8cfde6331bd59eb2ac96f8911c4b666->getPropByName($v972bf3f05d14ffbdb817bef60638ff00);
         if (is_null($v1a8db4c996d8ed8289da5f957879ab94)) {
             continue;
         }
         $v84b711c462ff4413ba5f54eef508bc85 = translatorWrapper::get($v1a8db4c996d8ed8289da5f957879ab94)->translate($v1a8db4c996d8ed8289da5f957879ab94);
         if (!empty($v84b711c462ff4413ba5f54eef508bc85)) {
             $vb116c0edc58650200e8613da6ced1228 = true;
             $v71ea3b11aebda17ad80b6499a6ab6fb0['nodes:property'][getRequest('jsonMode') == "force" ? $v865c0c0b4ab0e063e5caa3387c1a8741++ : ++$v865c0c0b4ab0e063e5caa3387c1a8741] = $v84b711c462ff4413ba5f54eef508bc85;
         }
     }
     return $vb116c0edc58650200e8613da6ced1228 ? $v71ea3b11aebda17ad80b6499a6ab6fb0 : array();
 }
		private static function checkPaymentProps(iUmiObject $object) {
			if($object->payment_type_id) {
				$types = umiObjectTypesCollection::getInstance();
				$typeObject = selector::get('object')->id($object->payment_type_id);
				$typeId = $types->getTypeIdByGUID($typeObject->payment_type_guid);
				if($typeId != $object->getTypeId()) {
					$object->setTypeId($typeId);
					$object->commit();
				}
			}
		}
예제 #3
0
 public function checkAllowedColumn(iUmiObject $object, $propName)
 {
     $userTypeId = umiHierarchyTypesCollection::getInstance()->getTypeByName('users', 'user')->getId();
     $isSv = permissionsCollection::getInstance()->isSv();
     $isObjectCustomer = $object->getTypeGUID() == 'emarket-customer';
     $isObjectUser = umiObjectTypesCollection::getInstance()->getType($object->getTypeId())->getHierarchyTypeId() == $userTypeId;
     $notAllowedProps = array('bonus', 'spent_bonus', 'filemanager_directory', 'groups');
     if (!$isSv && ($isObjectCustomer || $isObjectUser)) {
         if (in_array($propName, $notAllowedProps)) {
             return false;
         }
     }
     return true;
 }
 protected function translateData(iUmiObject $va8cfde6331bd59eb2ac96f8911c4b666)
 {
     $v16b2b26000987faccb260b9d39df1269 = $va8cfde6331bd59eb2ac96f8911c4b666->getId();
     $v26b75b176d665f24a5fd22a2ad815763 = array();
     $v26b75b176d665f24a5fd22a2ad815763['attribute:id'] = $v16b2b26000987faccb260b9d39df1269;
     $v26b75b176d665f24a5fd22a2ad815763['attribute:guid'] = $va8cfde6331bd59eb2ac96f8911c4b666->getGUID();
     $v26b75b176d665f24a5fd22a2ad815763['attribute:name'] = $va8cfde6331bd59eb2ac96f8911c4b666->getName();
     $v26b75b176d665f24a5fd22a2ad815763['attribute:type-id'] = $va8cfde6331bd59eb2ac96f8911c4b666->getTypeId();
     $v26b75b176d665f24a5fd22a2ad815763['attribute:type-guid'] = $va8cfde6331bd59eb2ac96f8911c4b666->getTypeGUID();
     $vb0ab4f7791b60b1e8ea01057b77873b0 = $va8cfde6331bd59eb2ac96f8911c4b666->getOwnerId();
     if ($vb0ab4f7791b60b1e8ea01057b77873b0) {
         $v26b75b176d665f24a5fd22a2ad815763['attribute:ownerId'] = $vb0ab4f7791b60b1e8ea01057b77873b0;
     }
     if ($this->isFull === false) {
         $v26b75b176d665f24a5fd22a2ad815763['xlink:href'] = "uobject://" . $v16b2b26000987faccb260b9d39df1269;
         return $v26b75b176d665f24a5fd22a2ad815763;
     }
     $v6301cee35ea764a1e241978f93f01069 = $va8cfde6331bd59eb2ac96f8911c4b666->getTypeId();
     $v726e8e4809d4c1b28a6549d86436a124 = umiObjectTypesCollection::getInstance()->getType($v6301cee35ea764a1e241978f93f01069);
     $v143fdbfa2afa490e521056bd5040d5fd = $v726e8e4809d4c1b28a6549d86436a124->getFieldsGroupsList();
     if (!is_null(getRequest('links'))) {
         $v8b1dc169bf460ee884fceef66c6607d6 = cmsController::getInstance();
         $vef8eea3357eeef6f5ddb3d707ff0e8e8 = umiHierarchyTypesCollection::getInstance();
         $v9b81909fd0da3add2602a8d0ede0e4e7 = umiObjectTypesCollection::getInstance();
         $v641ee90996ed9781bf72b559b9c90742 = $v726e8e4809d4c1b28a6549d86436a124;
         $v865c0c0b4ab0e063e5caa3387c1a8741 = 0;
         do {
             $vacf567c9c3d6cf7c6e2cc0ce108e0631 = $v641ee90996ed9781bf72b559b9c90742->getHierarchyTypeId();
             $v89b0b9deff65f8b9cd1f71bc74ce36ba = $vef8eea3357eeef6f5ddb3d707ff0e8e8->getType($vacf567c9c3d6cf7c6e2cc0ce108e0631);
             if ($v641ee90996ed9781bf72b559b9c90742->getParentId()) {
                 $v641ee90996ed9781bf72b559b9c90742 = $v9b81909fd0da3add2602a8d0ede0e4e7->getType($v641ee90996ed9781bf72b559b9c90742->getParentId());
                 break;
             }
             if ($v641ee90996ed9781bf72b559b9c90742->getParentId() == 0) {
                 break;
             }
         } while (!$v89b0b9deff65f8b9cd1f71bc74ce36ba && $v641ee90996ed9781bf72b559b9c90742);
         if ($v89b0b9deff65f8b9cd1f71bc74ce36ba instanceof iUmiHierarchyType) {
             $v52a43e48ec4649dee819dadabcab1bde = $v89b0b9deff65f8b9cd1f71bc74ce36ba->getName();
             $vddaa6e8c8c412299272e183087b8f7b6 = $v89b0b9deff65f8b9cd1f71bc74ce36ba->getExt();
             if ($ve52043002b9b5525cbc3f3bee69ff9b4 = $v8b1dc169bf460ee884fceef66c6607d6->getModule($v52a43e48ec4649dee819dadabcab1bde)) {
                 $v2a304a1348456ccd2234cd71a81bd338 = $ve52043002b9b5525cbc3f3bee69ff9b4->getObjectEditLink($v16b2b26000987faccb260b9d39df1269, $vddaa6e8c8c412299272e183087b8f7b6);
                 if ($v2a304a1348456ccd2234cd71a81bd338 !== false) {
                     $v26b75b176d665f24a5fd22a2ad815763['edit-link'] = $v2a304a1348456ccd2234cd71a81bd338;
                 }
             }
         }
         if (!isset($v26b75b176d665f24a5fd22a2ad815763['edit-link']) && $v8b1dc169bf460ee884fceef66c6607d6->getCurrentModule() == 'data' && $v8b1dc169bf460ee884fceef66c6607d6->getCurrentMethod() == 'guide_items') {
             $v764b2484f7ecf6b627a89fd3f7fe9f3d = $v8b1dc169bf460ee884fceef66c6607d6->getModule('data');
             $v26b75b176d665f24a5fd22a2ad815763['edit-link'] = $v764b2484f7ecf6b627a89fd3f7fe9f3d->getObjectEditLink($v16b2b26000987faccb260b9d39df1269);
         }
     }
     $v26b75b176d665f24a5fd22a2ad815763['properties'] = array();
     $v26b75b176d665f24a5fd22a2ad815763['properties']['nodes:group'] = array();
     $v865c0c0b4ab0e063e5caa3387c1a8741 = 0;
     foreach ($v143fdbfa2afa490e521056bd5040d5fd as $vdb0f6f37ebeb6ea09489124345af2a45) {
         $v71ea3b11aebda17ad80b6499a6ab6fb0 = array();
         $v03f2ce8694aef1464a97f254c78a26ae = translatorWrapper::get($vdb0f6f37ebeb6ea09489124345af2a45);
         $v71ea3b11aebda17ad80b6499a6ab6fb0 = $v03f2ce8694aef1464a97f254c78a26ae->translateProperties($vdb0f6f37ebeb6ea09489124345af2a45, $va8cfde6331bd59eb2ac96f8911c4b666);
         if (!empty($v71ea3b11aebda17ad80b6499a6ab6fb0)) {
             $v26b75b176d665f24a5fd22a2ad815763['properties']['nodes:group'][getRequest('jsonMode') == "force" ? $v865c0c0b4ab0e063e5caa3387c1a8741++ : ++$v865c0c0b4ab0e063e5caa3387c1a8741] = $v71ea3b11aebda17ad80b6499a6ab6fb0;
         }
     }
     if (sizeof($v26b75b176d665f24a5fd22a2ad815763['properties']['nodes:group']) == 0) {
         unset($v26b75b176d665f24a5fd22a2ad815763['properties']);
     }
     return $v26b75b176d665f24a5fd22a2ad815763;
 }
예제 #5
0
 protected function fakeBackupValue(iUmiObject $va8cfde6331bd59eb2ac96f8911c4b666, iUmiField $v06e3d36fa30cea095545139854ad1fb9)
 {
     $v2063c1608d6e0baf80249c42e2be5804 = $va8cfde6331bd59eb2ac96f8911c4b666->getValue($v06e3d36fa30cea095545139854ad1fb9->getName());
     switch ($v06e3d36fa30cea095545139854ad1fb9->getDataType()) {
         case 'file':
         case 'img_file':
         case 'swf_file':
             return $v2063c1608d6e0baf80249c42e2be5804 instanceof iUmiFile ? $v2063c1608d6e0baf80249c42e2be5804->getFilePath() : '';
         case 'boolean':
             return $v2063c1608d6e0baf80249c42e2be5804 ? '1' : '0';
         case 'date':
             return $v2063c1608d6e0baf80249c42e2be5804 instanceof umiDate ? $v2063c1608d6e0baf80249c42e2be5804->getFormattedDate('U') : NULL;
         case 'tags':
             return is_array($v2063c1608d6e0baf80249c42e2be5804) ? implode(", ", $v2063c1608d6e0baf80249c42e2be5804) : NULL;
         default:
             return (string) $v2063c1608d6e0baf80249c42e2be5804;
     }
 }