10use \Bitrix\Landing\Transfer\AppConfiguration;
11use \Bitrix\Landing\File;
12use \Bitrix\Landing\Folder;
13use \Bitrix\Landing\Hook;
14use \Bitrix\Landing\Repo;
15use \Bitrix\Landing\Block;
16use \Bitrix\Landing\Node;
17use \Bitrix\Main\Event;
19use \Bitrix\Rest\AppTable;
20use \Bitrix\Rest\Configuration;
41 self::$forceAppendRestBlocks = $mode;
50 public static function getRepoId(
string $appCode,
string $xmlId): ?int
57 $res = Repo::getList([
59 'ID',
'APP_CODE',
'XML_ID'
62 while ($row = $res->fetch())
64 $items[$row[
'APP_CODE'] .
'@' . $row[
'XML_ID']] = $row[
'ID'];
68 if (isset($items[$appCode .
'@' . $xmlId]))
70 return $items[$appCode .
'@' . $xmlId];
91 foreach ($data as $selector => &$nodes)
95 if (!isset($manifest[
'nodes'][$selector]))
100 $manifest[
'nodes'][$selector][
'type'] !==
Node\Type::IMAGE
101 && $manifest[
'nodes'][$selector][
'type'] !==
Node\Type::STYLE_IMAGE
107 foreach ($nodes as &$node)
109 foreach ([
'',
'2x'] as $x)
111 if (isset($node[
'id' . $x]))
113 $unpackedFile = $structure->getUnpackFile($node[
'id' . $x]);
116 $newFileId = AppConfiguration::saveFile($unpackedFile);
123 $node[
'id' . $x] = $newFileId;
124 $node[
'src' . $x] = $newFilePath;
146 if (isset($block[
'cards']) && is_array($block[
'cards']))
153 if (isset($block[
'style']) && is_array($block[
'style']))
155 foreach ($block[
'style'] as $selector => $styleData)
157 if ($selector ===
'#wrapper')
159 $selector =
'#' . $blockInstance->
getAnchor($blockInstance->
getId());
163 if (!isset($styleData[
'classList']) && !isset($styleData[
'style']))
165 foreach ((array)$styleData as $clPos => $clVal)
168 $selectorUpd = $selector .
'@' . $clPos;
169 $styleToSet[$selectorUpd][
'classList'] = (array)$clVal;
174 if (isset($styleData[
'classList']))
176 foreach ($styleData[
'classList'] as $clPos => $class)
180 $selectorUpd = $selector .
'@' . $clPos;
181 $styleToSet[$selectorUpd][
'classList'] = explode(
' ', $class);
185 if (isset($styleData[
'style']))
187 foreach ($styleData[
'style'] as $stPos => $styles)
191 $selectorUpd = $selector .
'@' . $stPos;
192 $styleToSet[$selectorUpd][
'style'] = $styles;
197 if (!empty($styleToSet))
204 if (isset($block[
'nodes']) && is_array($block[
'nodes']))
209 if (isset($block[
'menu']) && !empty($block[
'menu']))
214 if (isset($block[
'attrs']) && !empty($block[
'attrs']))
216 if (isset($block[
'attrs'][
'#wrapper']))
218 $attrCode =
'#' . $blockInstance->
getAnchor($blockInstance->
getId());
219 $block[
'attrs'][$attrCode] = $block[
'attrs'][
'#wrapper'];
220 unset($block[
'attrs'][
'#wrapper']);
225 if (isset($block[
'dynamic']) && is_array($block[
'dynamic']))
242 static $appChecked = [];
248 isset($block[
'repo_block'][
'app_code']) &&
249 isset($block[
'repo_block'][
'xml_id']) &&
250 is_string($block[
'repo_block'][
'app_code']) &&
251 is_string($block[
'repo_block'][
'xml_id'])
254 unset($block[
'code']);
256 $repoId = self::getRepoId(
257 $block[
'repo_block'][
'app_code'],
258 $block[
'repo_block'][
'xml_id']
262 $block[
'code'] =
'repo_' . $repoId;
267 !isset($block[
'code']) &&
268 !empty($block[
'repo_info']) &&
269 self::$forceAppendRestBlocks
272 $appCode = $block[
'repo_block'][
'app_code'];
273 if (!array_key_exists($appCode, $appChecked))
275 $appChecked[$appCode] = \Bitrix\Landing\Repo::getAppByCode($appCode);
278 if ($appChecked[$appCode])
280 $repoInfo = $block[
'repo_info'];
282 'APP_CODE' => $block[
'repo_block'][
'app_code'],
283 'XML_ID' => $block[
'repo_block'][
'xml_id'],
284 'NAME' => $repoInfo[
'NAME'] ??
null,
285 'DESCRIPTION' => $repoInfo[
'DESCRIPTION'] ??
null,
286 'SECTIONS' => $repoInfo[
'SECTIONS'] ??
null,
287 'PREVIEW' => $repoInfo[
'PREVIEW'] ??
null,
288 'MANIFEST' => serialize(unserialize($repoInfo[
'MANIFEST'] ??
'', [
'allowed_classes' =>
false])),
289 'CONTENT' => $repoInfo[
'CONTENT'] ??
null
291 if ($res->isSuccess())
293 $block[
'code'] =
'repo_' . $res->getId();
298 if (!isset($block[
'code']))
301 $blockId = $landing->addBlock(
302 AppConfiguration::SYSTEM_BLOCK_REST_PENDING,
306 'ANCHOR' => $block[
'anchor'] ??
'',
307 'INITIATOR_APP_CODE' => $block[
'repo_block'][
'app_code'] ??
null
313 $blockInstance = $landing->getBlockById($blockId);
316 if (isset($block[
'nodes']) && is_array($block[
'nodes']))
318 $block[
'nodes'] = self::addFilesToBlock(
325 $blockInstance->updateNodes([
326 AppConfiguration::SYSTEM_COMPONENT_REST_PENDING => [
327 'BLOCK_ID' => $blockId,
328 'DATA' => base64_encode(serialize($block)),
331 $blockInstance->save();
338 if (!isset($block[
'code']))
347 'ANCHOR' => $block[
'anchor'] ??
'',
348 'INITIATOR_APP_CODE' => $block[
'repo_block'][
'app_code'] ?? null
350 if ($block[
'full_content'] ??
null)
352 $blockFields[
'CONTENT'] = str_replace(
355 $block[
'full_content']
358 if ($block[
'designed'] ??
null)
360 $blockFields[
'DESIGNED'] =
'Y';
362 $blockId = $landing->addBlock(
369 $blockInstance = $landing->getBlockById($blockId);
370 if (isset($block[
'nodes']) && is_array($block[
'nodes']))
372 $block[
'nodes'] = self::addFilesToBlock(
378 if ($block[
'meta'][
'FAVORITE_META'] ?? [])
380 $favoriteMeta = $block[
'meta'][
'FAVORITE_META'];
381 if ($block[
'repo_block'][
'app_code'] ??
null)
383 $favoriteMeta[
'tpl_code'] = $block[
'repo_block'][
'app_code'];
385 if (intval($favoriteMeta[
'preview'] ?? 0) > 0)
387 $unpackFile = $structure->getUnpackFile($favoriteMeta[
'preview']);
390 $favoriteMeta[
'preview'] = AppConfiguration::saveFile($unpackFile);
393 if (!$favoriteMeta[
'preview'])
395 unset($favoriteMeta[
'preview']);
398 $blockInstance->changeFavoriteMeta($favoriteMeta);
399 \Bitrix\Landing\Block::clearRepositoryCache();
401 if ($blockFields[
'CONTENT'] ??
null)
403 $blockInstance->saveContent($blockFields[
'CONTENT'], $block[
'designed'] ??
false);
405 self::saveDataToBlock($blockInstance, $block);
406 $blockInstance->save();
408 if (intval($block[
'meta'][
'LID'] ?? -1) === 0)
410 $blockInstance->changeLanding(0);
428 $additional = $event->
getParameter(
'ADDITIONAL_OPTION');
430 $structure =
new Configuration\Structure($contextUser);
432 'RATIO' => $ratio[$code] ?? [],
433 'ERROR_MESSAGES' => []
436 if (!isset($content[
'~DATA']))
441 if (isset($return[
'RATIO'][
'TYPE']))
443 SiteCore\Type::setScope(
444 $return[
'RATIO'][
'TYPE']
448 if (!self::isNeedImport($event))
453 $data = $content[
'~DATA'];
454 $oldId = $data[
'ID'] ??
null;
456 if (isset($ratio[$code][
'SITE_ID']) && (
int)$ratio[$code][
'SITE_ID'] > 0)
458 $data[
'SITE_ID'] = (int)$ratio[$code][
'SITE_ID'];
460 elseif ($additional && (
int)$additional[
'siteId'] > 0)
462 $data[
'SITE_ID'] = (int)$additional[
'siteId'];
463 $return[
'RATIO'][
'SITE_ID'] = (int)$additional[
'siteId'];
466 if (($additional[
'siteId'] ?? 0) > 0)
468 LandingCore::enableCheckUniqueAddress();
471 $data = self::prepareData($data);
472 $data = self::prepareAdditionalFiles($data, $structure);
475 $convertFolderOldFormat =
false;
476 $return[
'RATIO'][
'FOLDERS_REF'] = $return[
'RATIO'][
'FOLDERS_REF'] ?? [];
477 if ($data[
'FOLDER'] ===
'Y')
479 $convertFolderOldFormat =
true;
480 $data[
'FOLDER'] =
'N';
481 $res = SiteCore::addFolder($ratio[$code][
'SITE_ID'], [
482 'TITLE' => $data[
'TITLE'],
483 'CODE' => $data[
'CODE']
485 if ($res->isSuccess())
487 $data[
'FOLDER_ID'] = $res->getId();
488 $return[
'RATIO'][
'FOLDERS_REF'][$oldId] = $data[
'FOLDER_ID'];
491 elseif ($additional && $additional[
'folderId'])
493 $data[
'FOLDER_ID'] = (int)$additional[
'folderId'];
500 $app = AppTable::getById($appId)->fetch();
501 $appCode = $app[
'CODE'] ??
null;
504 $data[
'XML_ID'] = $data[
'TITLE'] .
'|' . $appCode;
505 $data[
'PREVIOUS_TPL_CODE'] = $data[
'TPL_CODE'];
506 $data[
'TPL_CODE'] = $appCode;
511 $data[
'ACTIVE'] =
'N';
512 $data[
'PUBLIC'] =
'N';
513 $data[
'FOLDER_SKIP_CHECK'] =
'Y';
514 $data[
'INITIATOR_APP_CODE'] = $appCode;
515 unset($data[
'CODE']);
518 $data = self::prepareAdditionalFields($data, $additional, $ratio);
521 if ($res->isSuccess())
523 if ($convertFolderOldFormat && ($data[
'FOLDER_ID'] ?? 0))
525 Folder::update($data[
'FOLDER_ID'], [
'INDEX_ID' => $res->getId()]);
528 if (isset($data[
'BLOCKS']) && is_array($data[
'BLOCKS']))
530 $data = self::prepareBlocksData($data, $event);
533 self::saveAdditionalFilesToLanding($data, $res->getId());
535 $landing = LandingCore::createInstance($res->getId());
539 $return[
'RATIO'][
'LANDINGS'][$oldId] = $res->getId();
541 if (isset($data[
'TPL_ID']) && $data[
'TPL_ID'])
543 $return[
'RATIO'][
'TEMPLATE_LINKING'][$res->getId()] = [
544 'TPL_ID' => (int) $data[
'TPL_ID'],
545 'TEMPLATE_REF' => isset($data[
'TEMPLATE_REF'])
546 ? (array) $data[
'TEMPLATE_REF']
550 if (isset($data[
'BLOCKS']) && is_array($data[
'BLOCKS']))
552 foreach ($data[
'BLOCKS'] as $oldBlockId => $blockItem)
554 if (is_array($blockItem))
557 $newBlockId = self::importBlock(
563 $return[
'RATIO'][
'BLOCKS'][$oldBlockId] = $newBlockId;
566 $return[
'RATIO'][
'BLOCKS_PENDING'][] = $newBlockId;
574 $return[
'ERROR_MESSAGES'] = $res->getErrorMessages();
591 $additional = $event->
getParameter(
'ADDITIONAL_OPTION');
592 $structure =
new Configuration\Structure($contextUser);
594 if (!isset($content[
'~DATA']))
600 'RATIO' => $ratio[$code] ?? [],
601 'ERROR_MESSAGES' => []
604 $replaceLid = (int)$additional[
'replaceLid'];
605 if ($replaceLid <= 0)
607 $return[
'ERROR_MESSAGES'] =
'Not set landing ID for replace';
612 if (isset($return[
'RATIO'][
'TYPE']))
614 SiteCore\Type::setScope($return[
'RATIO'][
'TYPE']);
616 LandingCore::setEditMode();
617 $landing = LandingCore::createInstance($replaceLid);
618 if (!$landing->exist())
620 $return[
'ERROR_MESSAGES'] =
'Raplaced landing is not exists';
626 $return[
'RATIO'][
'LANDINGS'][$replaceLid] = $replaceLid;
628 if (!self::isNeedImport($event))
633 $data = $content[
'~DATA'];
634 $data = self::prepareData($data);
636 $additionalFieldsBefore = self::getAdditionalFieldsForReplaceByLanding($replaceLid);
637 if (is_array($ratio[$code][
'ADDITIONAL_FIELDS_SITE']) && !empty($ratio[$code][
'ADDITIONAL_FIELDS_SITE']))
639 $data = self::mergeAdditionalFieldsForReplace($data, $ratio[$code][
'ADDITIONAL_FIELDS_SITE']);
640 $data = self::prepareAdditionalFiles($data, $structure);
641 self::saveAdditionalFieldsToLanding($data, $replaceLid);
642 self::saveAdditionalFilesToLanding($data, $replaceLid);
645 if (isset($data[
'BLOCKS']) && is_array($data[
'BLOCKS']))
647 $data = self::prepareBlocksData($data, $event);
652 foreach ($landing->getBlocks() as $block)
654 $blockId = $block->getId();
655 $block->setAccess(Block::ACCESS_X);
656 if ($landing->markDeletedBlock($block->getId(),
true))
658 $blocksBefore[] = $blockId;
662 foreach ($data[
'BLOCKS'] as $oldBlockId => $block)
664 if (is_array($block) && !empty($block))
667 $newBlockId = self::importBlock(
673 $blocksAfter[] = $newBlockId;
674 $return[
'RATIO'][
'BLOCKS'][$oldBlockId] = $newBlockId;
677 $return[
'RATIO'][
'BLOCKS_PENDING'][] = $newBlockId;
683 $meta = $landing->getMeta();
684 if ($meta[
'SITE_SPECIAL'] ===
'Y')
686 $specialType = SiteCore\Type::getSiteTypeForms($meta[
'SITE_CODE']);
690 && $specialType ===
'crm_forms'
691 && Loader::includeModule(
'crm')
695 $res = Crm\WebForm\Internals\LandingTable::getList([
700 '=LANDING_ID' => $replaceLid
703 $row = $res->fetch();
704 $formId = $row ? $row[
'FORM_ID'] :
null;
707 foreach ($landing->getBlocks() as $block)
709 $manifest = $block->getManifest();
710 if (($manifest[
'block'][
'subtype'] ??
null) ===
'form')
713 if ($block->getAccess() > Block::ACCESS_W)
715 BlockTable::update($block->getId(), [
716 'ACCESS' => Block::ACCESS_W
726 $landing->publication();
731 $history->push(
'REPLACE_LANDING', [
732 'lid' => $replaceLid,
734 'blocksBefore' => $blocksBefore,
735 'blocksAfter' => $blocksAfter,
736 'additionalFieldsBefore' => $additionalFieldsBefore,
737 'additionalFieldsAfter' => $data[
'ADDITIONAL_FIELDS'],
756 $ratio[$code][
'IS_PAGE_IMPORT']
757 && isset($ratio[$code][
'SPECIAL_PAGES'][
'LANDING_ID_INDEX'])
758 && (
int)$content[
'DATA'][
'ID'] !== $ratio[$code][
'SPECIAL_PAGES'][
'LANDING_ID_INDEX']
771 'ID',
'VIEWS',
'DATE_CREATE',
'DATE_MODIFY',
772 'DATE_PUBLIC',
'CREATED_BY_ID',
'MODIFIED_BY_ID'
774 foreach ($notAllowedKeys as $key)
776 if (isset($data[$key]))
788 $appCode = $data[
'INITIATOR_APP_CODE'];
789 $newTplCode = $data[
'PREVIOUS_TPL_CODE'] ?? $data[
'TPL_CODE'];
790 $delobotAppCode =
'local.5eea949386cd05.00160385';
791 $kraytAppCode =
'local.5f11a19f813b13.97126836';
792 $bitrixAppCode =
'bitrix.';
794 strpos($newTplCode, $delobotAppCode) !==
false
795 || strpos($newTplCode, $kraytAppCode) !==
false
796 || strpos($appCode, $bitrixAppCode) === 0
799 $wrapperClasses = [];
800 $http = new \Bitrix\Main\Web\HttpClient;
801 $resPreview = $http->get(
'https://preview.bitrix24.site/tools/blocks.php?tplCode=' . $newTplCode);
806 $wrapperClasses = \Bitrix\Main\Web\Json::decode($resPreview);
808 catch (\Exception $e){}
814 foreach ($data[
'BLOCKS'] as &$blockData)
816 if (isset($wrapperClasses[$i]) && $wrapperClasses[$i][
'code'] === $blockData[
'code'])
818 $blockData[
'style'][
'#wrapper'] = [
'classList' => [$wrapperClasses[$i][
'classList']]];
825 unset($delobotAppCode, $kraytAppCode);
829 $templateDateCreate = strtotime($content[
'DATA'][
'DATE_CREATE']);
830 $lastDate = strtotime(
'17.02.2022 00:00:00');
831 if ($templateDateCreate < $lastDate)
833 $kraytCode =
'bitrix.krayt';
834 $delobotCode =
'bitrix.delobot';
835 if (strpos($appCode, $kraytCode) !==
false || strpos($appCode, $delobotCode) !==
false)
837 if (array_slice($data[
'BLOCKS'], -1)[0][
'code'] ===
'17.copyright')
839 array_pop($data[
'BLOCKS']);
842 unset($kraytCode, $delobotCode);
845 foreach ($data[
'BLOCKS'] as &$block)
848 if (isset($block[
'nodes']) && strpos($appCode, $bitrixAppCode) === 0)
850 foreach ($block[
'nodes'] as &$node)
853 foreach ($node as &$nodeItem)
855 if (isset($nodeItem[
'href']))
857 $setContactsBlockCode = [
858 '14.1.contacts_4_cols',
859 '14.2contacts_3_cols',
860 '14.3contacts_2_cols'
862 if (preg_match(
'/^tel:.*$/i', $nodeItem[
'href']))
864 $nodeItem[
'href'] =
'tel:#crmPhone1';
865 if (isset($nodeItem[
'text']))
867 $nodeItem[
'text'] =
'#crmPhoneTitle1';
870 (isset($block[
'nodes'][
'.landing-block-node-linkcontact-text'])
871 && in_array($block[
'code'], $setContactsBlockCode,
true))
874 $block[
'nodes'][
'.landing-block-node-linkcontact-text'][$countNodeItem] =
'#crmPhoneTitle1';
877 if (preg_match(
'/^mailto:.*$/i', $nodeItem[
'href']))
879 $nodeItem[
'href'] =
'mailto:#crmEmail1';
880 if (isset($nodeItem[
'text']))
882 $nodeItem[
'text'] =
'#crmEmailTitle1';
885 isset($block[
'nodes'][
'.landing-block-node-linkcontact-text'])
886 && (in_array($block[
'code'], $setContactsBlockCode,
true))
889 $block[
'nodes'][
'.landing-block-node-linkcontact-text'][$countNodeItem] =
'#crmEmailTitle1';
900 if (isset($block[
'attrs']))
902 foreach ($block[
'attrs'] as &$attr)
904 foreach ($attr as &$attrItem)
906 if (array_key_exists(
'data-end-date', $attrItem))
908 $neededAttr = $attrItem[
'data-end-date'] / 1000;
909 $currenDate = time();
910 if ($neededAttr < $currenDate)
912 $m = date(
'm', $neededAttr);
913 $d = date(
'd', $neededAttr);
914 $currenDateY = (int)date(
'Y', $currenDate);
915 $currenDateM = date(
'm', $currenDate);
916 $currenDateD = date(
'd', $currenDate);
917 if ($currenDateM > $m)
919 $y = $currenDateY + 1;
921 else if (($currenDateM === $m) && $currenDateD >= $d)
923 $y = $currenDateY + 1;
930 $timestamp = strtotime($y .
'-' . $m .
'-' . $d .
' ' . $time) * 1000;
931 $attrItem[
'data-end-date'] = (string)$timestamp;
934 '/data-end-date="\d+"/',
935 $block[
'full_content'],
939 $block[
'full_content'] = str_replace(
941 'data-end-date="' . $attrItem[
'data-end-date'] .
'"',
942 $block[
'full_content']
969 isset($data[
'ADDITIONAL_FIELDS'][$hookCode]) &&
970 $data[
'ADDITIONAL_FIELDS'][$hookCode] > 0
973 $unpackFile = $structure->getUnpackFile($data[
'ADDITIONAL_FIELDS'][$hookCode]);
977 $data[
'ADDITIONAL_FIELDS'][$hookCode] = AppConfiguration::saveFile(
983 unset($data[
'ADDITIONAL_FIELDS'][$hookCode]);
1002 isset($data[
'ADDITIONAL_FIELDS'][$hookCode]) &&
1003 $data[
'ADDITIONAL_FIELDS'][$hookCode] > 0
1020 $data[
'ADDITIONAL_FIELDS'][
'THEME_USE'] =
'N';
1021 if (isset($additional[
'theme']) || isset($additional[
'theme_use_site']))
1023 $color = $additional[
'theme_use_site'] ?? $additional[
'theme'];
1024 if ($color[0] !==
'#')
1026 $color =
'#'.$color;
1028 $data[
'ADDITIONAL_FIELDS'][
'THEME_COLOR'] = $color;
1029 unset($data[
'ADDITIONAL_FIELDS'][
'THEME_CODE']);
1032 $isSinglePage = !is_array($ratio) || empty($ratio);
1033 if ($isSinglePage && !$additional[
'theme_use_site'])
1035 $data[
'ADDITIONAL_FIELDS'][
'THEME_USE'] =
'Y';
1040 $isMainpage =
false;
1041 if ($additional[
'title'] && $isMainpage)
1043 $data[
'ADDITIONAL_FIELDS'][
'METAOG_TITLE'] = $additional[
'title'];
1044 $data[
'ADDITIONAL_FIELDS'][
'METAMAIN_TITLE'] = $additional[
'title'];
1047 if ($additional[
'description'] && $isMainpage)
1049 $data[
'ADDITIONAL_FIELDS'][
'METAOG_DESCRIPTION'] = $additional[
'description'];
1050 $data[
'ADDITIONAL_FIELDS'][
'METAMAIN_DESCRIPTION'] = $additional[
'description'];
1054 $buttons = \Bitrix\Landing\Hook\Page\B24button::getButtons();
1055 $buttonKeys = array_keys($buttons);
1056 if (!empty($buttonKeys))
1058 $data[
'ADDITIONAL_FIELDS'][
'B24BUTTON_CODE'] = $buttonKeys[0];
1062 $data[
'ADDITIONAL_FIELDS'][
'B24BUTTON_CODE'] =
'N';
1064 $data[
'ADDITIONAL_FIELDS'][
'B24BUTTON_USE'] =
'N';
1071 $additionalFields = [];
1073 foreach ($hooks as $hook => $fields)
1075 foreach ($fields as $code => $field)
1077 $additionalFields[$hook .
'_' . $code] = $field;
1081 return self::getAdditionalFieldsForReplace($additionalFields);
1093 $additionalFields = $data[
'ADDITIONAL_FIELDS'] ?? [];
1094 foreach (self::getAdditionalFieldsForReplace($additionalFieldsSite) as $code => $field)
1096 if (!isset($additionalFields[$code]))
1098 $additionalFields[$code] = $field;
1101 $data[
'ADDITIONAL_FIELDS'] = $additionalFields;
1116 $result[$hookCode] = $additionalFields[$hookCode] ??
'';
1124 if (is_array($data[
'ADDITIONAL_FIELDS']) && !empty($data[
'ADDITIONAL_FIELDS']))
1126 LandingCore::saveAdditionalFields($landingId, $data[
'ADDITIONAL_FIELDS']);
getManifest($extended=false, $missCache=false, array $params=array())
updateNodes($data, $additional=array())
saveDynamicParams(array $sourceParams=[], array $params=[])
updateCards(array $data=array())
static addToLanding($lid, $fileId)
static addToBlock(int $blockId, $fileId, bool $temp=false)
static getFilePath($fileId)
const ENTITY_TYPE_LANDING
static getData($id, $type, $asIs=false)
const ENTITY_TYPE_LANDING
static isAutoPublicationEnabled()
static addFilesToBlock(Block $block, array $data, Configuration\Structure $structure, bool $ignoreManifest=false)
static mergeAdditionalFieldsForReplace(array $data, array $additionalFieldsSite)
static prepareBlocksData(array $data, Event $event)
static setForceAppendRestBlocks(bool $mode)
static $forceAppendRestBlocks
static saveDataToBlock(Block $blockInstance, array $block)
static isNeedImport(Event $event)
static replaceLanding(Event $event)
static importLanding(Event $event)
static saveAdditionalFieldsToLanding(array $data, int $landingId)
static prepareAdditionalFields(array $data, array $additional, array $ratio=null)
static getAdditionalFieldsForReplaceByLanding(int $lid)
static saveAdditionalFilesToLanding(array $data, $landingId)
static prepareAdditionalFiles(array $data, Configuration\Structure $structure)
static getRepoId(string $appCode, string $xmlId)
static importBlock(LandingCore $landing, array $block, Configuration\Structure $structure, bool &$pending=false)
static prepareData(array $data)
static getAdditionalFieldsForReplace(array $additionalFields)