1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
block.php
См. документацию.
1<?php
3
12use Bitrix\Landing\Block as BlockCore;
16
17Loc::loadMessages(__FILE__);
18
19class Block
20{
30 private static function cardAction($action, $lid, $block, $selector, array $params = array())
31 {
32 $error = new \Bitrix\Landing\Error;
34 $landing = Landing::createInstance($lid, [
35 'blocks_id' => $block
36 ]);
37 // try find the block in landing instance
38 if ($landing->exist())
39 {
40 $block = intval($block);
41 $blocks = $landing->getBlocks();
42 if (isset($blocks[$block]))
43 {
44 // action with card of block
45 if (mb_strpos($selector, '@') !== false)
46 {
47 [$selector, $position] = explode('@', $selector);
48 }
49 else
50 {
51 $position = -1;
52 }
53 if (
54 mb_strtolower($action) == 'clonecard' &&
55 isset($params['content'])
56 )
57 {
58 $res = $blocks[$block]->$action(
59 $selector,
60 $position,
62 $params['content'], $bad
63 )
64 );
65 }
66 else
67 {
68 $res = $blocks[$block]->$action($selector, $position);
69 }
70 if ($res)
71 {
72 $result->setResult($blocks[$block]->save());
73 }
74 if ($blocks[$block]->getError()->isEmpty())
75 {
76 $landing->touch();
77 }
78 $result->setError($blocks[$block]->getError());
79 }
80 else
81 {
82 $error->addError(
83 'BLOCK_NOT_FOUND',
84 Loc::getMessage('LANDING_BLOCK_NOT_FOUND')
85 );
86 }
87 }
88 $result->setError($landing->getError());
89 $result->setError($error);
90 return $result;
91 }
92
101 public static function cloneCard($lid, $block, $selector, bool $preventHistory = false)
102 {
103 Landing::setEditMode();
104 $preventHistory ? History::deactivate() : History::activate();
105
106 return self::cardAction('cloneCard', $lid, $block, $selector);
107 }
108
118 public static function addCard($lid, $block, $selector, $content, bool $preventHistory = false)
119 {
120 Landing::setEditMode();
121 $preventHistory ? History::deactivate() : History::activate();
122
123 return self::cardAction(
124 'cloneCard',
125 $lid,
126 $block,
127 $selector,
128 array(
129 'content' => $content
130 )
131 );
132 }
133
142 public static function removeCard($lid, $block, $selector, bool $preventHistory = false)
143 {
144 Landing::setEditMode();
145 $preventHistory ? History::deactivate() : History::activate();
146
147 return self::cardAction('removeCard', $lid, $block, $selector);
148 }
149
157 public static function updateCards($lid, $block, array $data)
158 {
159 $error = new \Bitrix\Landing\Error;
161
162 Landing::setEditMode();
163
164 $landing = Landing::createInstance($lid, [
165 'blocks_id' => $block
166 ]);
167 if ($landing->exist())
168 {
169 $block = intval($block);
170 $blocks = $landing->getBlocks();
171 if (isset($blocks[$block]))
172 {
173 $currBlock = $blocks[$block];
174 $currBlock->updateCards((array)$data);
175 $result->setResult($currBlock->save());
176 $result->setError($currBlock->getError());
177 if ($currBlock->getError()->isEmpty())
178 {
179 $landing->touch();
180 }
181 }
182 else
183 {
184 $error->addError(
185 'BLOCK_NOT_FOUND',
186 Loc::getMessage('LANDING_BLOCK_NOT_FOUND')
187 );
188 }
189 }
190 $result->setError($landing->getError());
191 $result->setError($error);
192
193 return $result;
194 }
195
204 public static function changeNodeName($lid, $block, array $data, bool $preventHistory = false)
205 {
206 $error = new \Bitrix\Landing\Error;
208
209 $content = array();
210 Landing::setEditMode();
211
212 $preventHistory ? History::deactivate() : History::activate();
213
214 // collect selectors in right array
215 foreach ($data as $selector => $value)
216 {
217 if (mb_strpos($selector, '@') !== false)
218 {
219 [$selector, $position] = explode('@', $selector);
220 }
221 else
222 {
223 $position = 0;
224 }
225 if (!isset($content[$selector]))
226 {
227 $content[$selector] = array();
228 }
229 $content[$selector][$position] = $value;
230 }
231
232 if (!empty($content))
233 {
234 $landing = Landing::createInstance($lid, [
235 'blocks_id' => $block
236 ]);
237 // try find the block in landing instance
238 if ($landing->exist())
239 {
240 $block = intval($block);
241 $blocks = $landing->getBlocks();
242 if (isset($blocks[$block]))
243 {
244 $blocks[$block]->changeNodeName($content);
245 $result->setResult($blocks[$block]->save());
246 $result->setError($blocks[$block]->getError());
247 if ($blocks[$block]->getError()->isEmpty())
248 {
249 $landing->touch();
250 }
251 }
252 else
253 {
254 $error->addError(
255 'BLOCK_NOT_FOUND',
256 Loc::getMessage('LANDING_BLOCK_NOT_FOUND')
257 );
258 }
259 }
260 $result->setError($landing->getError());
261 }
262 else
263 {
264 $error->addError(
265 'NODES_NOT_FOUND',
266 Loc::getMessage('LANDING_BLOCK_NODES_NOT_FOUND')
267 );
268 }
269
270 return $result;
271 }
272
281 public static function changeAnchor($lid, $block, $data, bool $preventHistory = false)
282 {
283 $error = new \Bitrix\Landing\Error;
285
286 Landing::setEditMode();
287
288 $preventHistory ? History::deactivate() : History::activate();
289
290 $landing = Landing::createInstance($lid, [
291 'blocks_id' => $block
292 ]);
293
294 if ($landing->exist())
295 {
296 $block = intval($block);
297 $blocks = $landing->getBlocks();
298 if (isset($blocks[$block]))
299 {
300 $blocks[$block]->setAnchor($data);
301 $result->setResult($blocks[$block]->save());
302 $result->setError($blocks[$block]->getError());
303 if ($blocks[$block]->getError()->isEmpty())
304 {
305 $landing->touch();
306 }
307 }
308 else
309 {
310 $error->addError(
311 'BLOCK_NOT_FOUND',
312 Loc::getMessage('LANDING_BLOCK_NOT_FOUND')
313 );
314 }
315 }
316 $result->setError($landing->getError());
317
318 return $result;
319 }
320
330 public static function updateNodes($lid, $block, array $data, array $additional = array(), bool $preventHistory = false)
331 {
332 $error = new \Bitrix\Landing\Error;
334
335 $attributes = array();
336 $components = array();
337 $content = array();
338 $data = (array) $data;
339 $dynamicParamsExists = false;
340 $block = intval($block);
341
342 Landing::setEditMode();
343 $preventHistory ? History::deactivate() : History::activate();
344
345 // save dynamic cards settings
346 if (isset($data['dynamicState']) || isset($data['dynamicBlock']))//@tmp refactor
347 {
348 $dynamicParamsExists = true;
349 $landing = Landing::createInstance($lid, [
350 'blocks_id' => $block
351 ]);
352 if ($landing->exist())
353 {
354 if ($blockCurrent = $landing->getBlockById($block))
355 {
356 $manifest = $blockCurrent->getManifest();
357 if (
358 !isset($manifest['block']['dynamic']) ||
359 $manifest['block']['dynamic'] !== false
360 )
361 {
362 // get dynamic data from request or from block
363 if (isset($data['dynamicParams']))
364 {
365 $dynamicParams = $data['dynamicParams'];
366 unset($data['dynamicParams']);
367 }
368 else
369 {
370 $dynamicParams = $blockCurrent->getDynamicParams();
371 }
372 // if some dynamic is off
373 if (isset($data['dynamicState']))
374 {
375 foreach ((array) $data['dynamicState'] as $selector => $flag)
376 {
377 if (!Utils::isTrue($flag) && isset($dynamicParams[$selector]))
378 {
379 unset($dynamicParams[$selector]);
380 }
381 }
382 }
383 $blockCurrent->saveDynamicParams(
384 $dynamicParams
385 );
386 }
387 $result->setResult(true);
388 }
389 else
390 {
391 $error->addError(
392 'BLOCK_NOT_FOUND',
393 Loc::getMessage('LANDING_BLOCK_NOT_FOUND')
394 );
395 $result->setError($error);
396 }
397 }
398 $result->setError($landing->getError());
399 }
400
401 // break on error
402 if (!$result->getError()->isEmpty())
403 {
404 return $result;
405 }
406
407 // collect selectors in right array
408 foreach ($data as $selector => $value)
409 {
410 if (mb_strpos($selector, '@') !== false)
411 {
412 [$selector, $position] = explode('@', $selector);
413 }
414 else
415 {
416 $position = -1;
417 }
418 if (!isset($data[$selector]))
419 {
420 $data[$selector] = array();
421 }
422 if (isset($value['attrs']) && count($value) == 1)
423 {
424 if (mb_strpos($selector, ':') !== false)
425 {
426 $components[$selector] = $value['attrs'];
427 }
428 else
429 {
430 $attributes[$selector][$position] = $value['attrs'];
431 }
432 }
433 else
434 {
435 if (!isset($content[$selector]))
436 {
437 $content[$selector] = array();
438 }
439 $content[$selector][max(0, $position)] = $value;
440 }
441 }
442
443 // data is not empty
444 if (!empty($content) || !empty($attributes) || !empty($components))
445 {
446 if (!isset($landing))
447 {
448 $landing = Landing::createInstance($lid, [
449 'blocks_id' => $block
450 ]);
451 }
452 // try find the block in landing instance
453 if ($landing->exist())
454 {
455 $blocks = $landing->getBlocks();
456 if (isset($blocks[$block]))
457 {
458 if (!empty($content))
459 {
460 $blocks[$block]->updateNodes($content, $additional);
461 }
462 if (!empty($attributes))
463 {
464 $blocks[$block]->setAttributes($attributes);
465 }
466 if (!empty($components))
467 {
468 // fix for security waf
469 if (!$blocks[$block]->getRepoId())
470 {
471 $manifest = $blocks[$block]->getManifest();
472 foreach ($components as $selector => &$attrs)
473 {
474 if (
475 isset($manifest['nodes'][$selector]['waf_ignore']) &&
476 $manifest['nodes'][$selector]['waf_ignore']
477 )
478 {
479 $rawData = \Bitrix\Landing\PublicAction::getRawData();
480 if (isset($rawData['data'][$selector]['attrs']))
481 {
482 $rawAttrs = $rawData['data'][$selector]['attrs'];
483 foreach ($attrs as $attCode => &$attValue)
484 {
485 $attValue = $rawAttrs[$attCode];
486 }
487 }
488 unset($attValue);
489 }
490 }
491 unset($attrs);
492 $blocks[$block]->updateNodes($components, $additional);
493 }
494 }
495 $blocks[$block]->saveContent(
496 str_replace(
497 'contenteditable="true"',
498 '',
499 $blocks[$block]->getContent()
500 )
501 );
502 $result->setResult($blocks[$block]->save());
503 $result->setError($blocks[$block]->getError());
504 if ($blocks[$block]->getError()->isEmpty())
505 {
506 $landing->touch();
507 }
508 }
509 else
510 {
511 $error->addError(
512 'BLOCK_NOT_FOUND',
513 Loc::getMessage('LANDING_BLOCK_NOT_FOUND')
514 );
515 }
516 }
517 $result->setError($landing->getError());
518 }
519 else if (!$dynamicParamsExists)
520 {
521 $error->addError(
522 'NODES_NOT_FOUND',
523 Loc::getMessage('LANDING_BLOCK_NODES_NOT_FOUND')
524 );
525 }
526
527 $result->setError($error);
528
529 return $result;
530 }
531
540 private static function updateAttributes($lid, $block, array $data, $method)
541 {
542 $error = new \Bitrix\Landing\Error;
544
545 Landing::setEditMode();
546
547 // try find the block in landing instance
548 $landing = Landing::createInstance($lid, [
549 'blocks_id' => $block
550 ]);
551 if ($landing->exist())
552 {
553 $block = intval($block);
554 $blocks = $landing->getBlocks();
555 if (isset($blocks[$block]))
556 {
557 if (is_callable(array($blocks[$block], $method)))
558 {
559 $blocks[$block]->$method($data);
560 }
561 $result->setResult($blocks[$block]->save());
562 $result->setError($blocks[$block]->getError());
563 if ($blocks[$block]->getError()->isEmpty())
564 {
565 $landing->touch();
566 }
567 }
568 else
569 {
570 $error->addError(
571 'BLOCK_NOT_FOUND',
572 Loc::getMessage('LANDING_BLOCK_NOT_FOUND')
573 );
574 }
575 }
576 $result->setError($landing->getError());
577 $result->setError($error);
578
579 return $result;
580 }
581
590 public static function updateStyles($lid, $block, array $data, bool $preventHistory = false)
591 {
592 $preventHistory ? History::deactivate() : History::activate();
593
594 $lastResult = null;
595 foreach ($data as $selector => $value)
596 {
597 $lastResult = self::updateAttributes($lid, $block, [$selector => $value], 'setClasses');
598 }
599 return $lastResult;
600 }
601
609 public static function updateAttrs($lid, $block, array $data)
610 {
611 foreach ($data as $selector => $value)
612 {
613 if (mb_strpos($selector, '@') !== false)
614 {
615 unset($data[$selector]);
616 [$selector, $pos] = explode('@', $selector);
617 if (
618 !isset($data[$selector]) ||
619 !is_array($data[$selector])
620 )
621 {
622 $data[$selector] = [];
623 }
624 $data[$selector][$pos] = $value;
625 }
626 }
627 return self::updateAttributes($lid, $block, $data, 'setAttributes');
628 }
629
638 public static function getContent($lid, $block, $editMode = false, array $params = array())
639 {
641 $error = new \Bitrix\Landing\Error;
642
643 if ($editMode)
644 {
645 Landing::setEditMode();
646 Hook::setEditMode();
647 }
648
649 $landing = Landing::createInstance($lid, [
650 'blocks_id' => $block
651 ]);
652 // try find the block in landing instance
653 if ($landing->exist())
654 {
655 $block = intval($block);
656 $blocks = $landing->getBlocks();
657 if (isset($blocks[$block]))
658 {
659 if (!is_array($params))
660 {
661 $params = array();
662 }
663
664 $result->setResult(
665 BlockCore::getBlockContent(
666 $blocks[$block]->getId(),
667 $editMode,
668 $params
669 )
670 );
671 }
672 else
673 {
674 $error->addError(
675 'BLOCK_NOT_FOUND',
676 Loc::getMessage('LANDING_BLOCK_NOT_FOUND')
677 );
678 }
679 }
680 $result->setError($landing->getError());
681
682 return $result;
683 }
684
694 public static function updateContent($lid, $block, $content, $designed = false, bool $preventHistory = false)
695 {
697 $error = new \Bitrix\Landing\Error;
698
699 Landing::setEditMode();
700
701 if (Utils::isTrue($designed))
702 {
703 if (!Restriction\Manager::isAllowed('limit_crm_superblock'))
704 {
705 return $result;
706 }
707 }
708
709 if (strpos($content, 'block-wrapper'))
710 {
711 $content = preg_replace('/^<div.*?class="[^"]*block-wrapper[\s"][^>]+>(.*?)<\/div>$/is', '$1', $content);
712 }
713
714 $landing = Landing::createInstance($lid, [
715 'blocks_id' => $block
716 ]);
717 // try find the block in landing instance
718 if ($landing->exist())
719 {
720 $block = intval($block);
721 $blocks = $landing->getBlocks();
722 if (isset($blocks[$block]))
723 {
724 // remove extra files
725 $newContent = Manager::sanitize($content, $bad);
726 $filesBeforeSave = File::getFilesFromBlockContent(
727 $block,
728 $blocks[$block]->getContent()
729 );
730 $filesAfterSave = File::getFilesFromBlockContent(
731 $block,
732 $newContent
733 );
734 $filesRest = array_intersect($filesBeforeSave, $filesAfterSave);
735 $filesDelete = [];
736 foreach ($filesBeforeSave as $fileId)
737 {
738 if (!in_array($fileId, $filesRest))
739 {
740 $filesDelete[] = $fileId;
741 }
742 }
743 if ($filesDelete)
744 {
745 File::deleteFromBlock($block, $filesDelete);
746 }
747
748 if (!$preventHistory)
749 {
750 History::activate();
751 $history = new History($lid, History::ENTITY_TYPE_LANDING);
752 $history->push('UPDATE_CONTENT', [
753 'block' => $blocks[$block]->getId(),
754 'contentBefore' => $blocks[$block]->getContent(),
755 'contentAfter' => $newContent,
756 'designed' => $designed,
757 ]);
758 }
759 else
760 {
761 History::deactivate();
762 }
763
764 // update content
765 $blocks[$block]->saveContent(
766 $newContent,
767 Utils::isTrue($designed)
768 );
769 Assets\PreProcessing::blockUpdateNodeProcessing(
770 $blocks[$block]
771 );
772 $result->setResult(
773 $blocks[$block]->save()
774 );
775 $result->setError($blocks[$block]->getError());
776 }
777 else
778 {
779 $error->addError(
780 'BLOCK_NOT_FOUND',
781 Loc::getMessage('LANDING_BLOCK_NOT_FOUND')
782 );
783 }
784 }
785 $result->setError($landing->getError());
786
787 return $result;
788 }
789
795 public static function publication($block): PublicActionResult
796 {
798 $block = intval($block);
799
800 $lid = BlockCore::getLandingIdByBlockId($block);
801 if ($lid)
802 {
803 $landing = Landing::createInstance($lid);
804 if ($landing->exist())
805 {
806 $metrikaParams = new Metrika\FieldsDto(
807 type: Metrika\Types::template,
808 subSection: 'from_editor',
809 element: 'auto',
810 );
811 $result->setResult($landing->publication($block, $metrikaParams));
812 }
813 $result->setError($landing->getError());
814 }
815
816 return $result;
817 }
818
825 public static function getList($lid, array $params = array())
826 {
827 static $mixedParams = ['lid'];
828
830 $lids = is_array($lid) ? $lid : [$lid];
831
832 // some params
833 if (
834 isset($params['edit_mode']) &&
835 $params['edit_mode']
836 )
837 {
838 Landing::setEditMode();
839 }
840
841 // get list
842 $data = array();
843 foreach ($lids as $lid)
844 {
845 $lid = intval($lid);
846 $landing = Landing::createInstance($lid, array(
847 'deleted' => isset($params['deleted']) && $params['deleted']
848 ));
849 if ($landing->exist())
850 {
851 foreach ($landing->getBlocks() as $i => $block)
852 {
853 if ($manifest = $block->getManifest())
854 {
855 $data[$i] = array(
856 'id' => $block->getId(),
857 'lid' => $lid,
858 'code' => $block->getCode(),
859 'name' => $manifest['block']['name'],
860 'active' => $block->isActive(),
861 'meta' => $block->getMeta()
862 );
863
864 // stringify meta
865 foreach ($data[$i]['meta'] as &$meta)
866 {
867 $meta = (string)$meta;
868 }
869 unset($meta);
870
871 // buffer content
872 if (
873 isset($params['get_content']) &&
874 $params['get_content']
875 )
876 {
877 ob_start();
878 $block->view(false, $landing);
879 $data[$i]['content'] = ob_get_contents();
880 $data[$i]['css'] = $block->getCSS();
881 $data[$i]['js'] = $block->getJS();
882 ob_end_clean();
883 }
884 }
885 }
886 }
887 $result->setError($landing->getError());
888 }
889
890 $result->setResult(array_values($data));
891
892 return $result;
893 }
894
901 public static function getById($block, array $params = array())
902 {
903 $error = new \Bitrix\Landing\Error;
905 $block = (int)$block;
906
907 // recognize landing by block
908 $lid = BlockCore::getLandingIdByBlockId($block);
909 if ($lid)
910 {
911 // and find this block in landing blocks
912 $blocks = self::getList($lid, $params)->getResult();
913 foreach ($blocks as $item)
914 {
915 if ($item['id'] == $block)
916 {
917 $result->setResult($item);
918 return $result;
919 }
920 }
921 }
922
923 $error->addError(
924 'BLOCK_NOT_FOUND',
925 Loc::getMessage('LANDING_BLOCK_NOT_FOUND')
926 );
927 $result->setError($error);
928
929 return $result;
930 }
931
939 public static function getManifest($lid, $block, array $params = array())
940 {
941 $error = new \Bitrix\Landing\Error;
943
944 if (
945 isset($params['edit_mode']) &&
946 $params['edit_mode']
947 )
948 {
949 Landing::setEditMode();
950 }
951
952 $landing = Landing::createInstance($lid, [
953 'blocks_id' => $block
954 ]);
955
956 if ($landing->exist())
957 {
958 $block = intval($block);
959 $blocks = $landing->getBlocks();
960 if (isset($blocks[$block]))
961 {
962 $manifest = $blocks[$block]->getManifest();
963 $manifest['preview'] = $blocks[$block]->getPreview();
964 $manifest['assets'] = $blocks[$block]->getAsset();
965 $result->setResult($manifest);
966 }
967 else
968 {
969 $error->addError(
970 'BLOCK_NOT_FOUND',
971 Loc::getMessage('LANDING_BLOCK_NOT_FOUND')
972 );
973 }
974 }
975
976 $result->setError($landing->getError());
977 $result->setError($error);
978
979 return $result;
980 }
981
987 public static function getManifestFile($code)
988 {
990
991 if (mb_strpos($code, ':') === false)
992 {
993 $code = 'bitrix:' . $code;
994 }
995
997 $result->setResult($manifest);
998
999 return $result;
1000 }
1001
1007 public static function getContentFromRepository($code)
1008 {
1010
1011 $result->setResult(
1013 );
1014
1015 return $result;
1016 }
1017
1022 public static function getRepository($section = null)
1023 {
1025 $repo = (new BlockRepo())->getRepository();
1026
1027 if ($section === null)
1028 {
1029 $result->setResult($repo);
1030 }
1031 else
1032 {
1033 $result->setResult(
1034 (is_string($section) && isset($repo[$section])) ? $repo[$section] : false
1035 );
1036 }
1037
1038 return $result;
1039 }
1040
1050 public static function uploadFile($block, $picture, $ext = false, array $params = [], $temp = false): PublicActionResult
1051 {
1052 static $mixedParams = ['picture'];
1053
1055 $error = new \Bitrix\Landing\Error;
1056 $block = intval($block);
1057
1058 $landing = Landing::createInstance(
1059 BlockCore::getLandingIdByBlockId($block),
1060 ['skip_blocks' => true]
1061 );
1062
1063 if ($landing->exist())
1064 {
1065 $file = Manager::savePicture($picture, $ext, $params);
1066 if ($file)
1067 {
1068 File::addToBlock($block, $file['ID'], Utils::isTrue($temp));
1069 $result->setResult(array(
1070 'id' => $file['ID'],
1071 'src' => $file['SRC']
1072 ));
1073 }
1074 else
1075 {
1076 $error->addError(
1077 'FILE_ERROR',
1078 Loc::getMessage('LANDING_FILE_ERROR')
1079 );
1080 $result->setError($error);
1081 }
1082 }
1083 else
1084 {
1085 $error->addError(
1086 'BLOCK_NOT_FOUND',
1087 Loc::getMessage('LANDING_BLOCK_NOT_FOUND')
1088 );
1089 $result->setError($error);
1090 }
1091
1092 return $result;
1093 }
1094
1100 public static function getFileDisk(int $fileId): PublicActionResult
1101 {
1102 static $internal = true;
1103
1105 $result->setResult(null);
1106
1107 if ($file = \Bitrix\Landing\Connector\Disk::getFileInfo($fileId, true, true))
1108 {
1109 $result->setResult([
1110 'ID' => $file['OBJECT_ID'],
1111 'NAME' => $file['NAME']
1112 ]);
1113 }
1114
1115 return $result;
1116 }
1117
1125 public static function getAssetsConfig(array $extCodes, array $tplCodes = []): PublicActionResult
1126 {
1128
1129 $assetsManager = (new Assets\Manager())
1130 ->enableSandbox()
1131 ->addAsset($extCodes)
1132 ;
1133
1134 foreach ($tplCodes as $tpl)
1135 {
1136 $siteTemplatePath =
1137 (defined('SITE_TEMPLATE_PATH') ? SITE_TEMPLATE_PATH : '/bitrix/templates/.default');
1138 $style = $siteTemplatePath . "/template_styles.css";
1139 $assetsManager->addAsset($style);
1140 }
1141
1142 $result->setResult($assetsManager->getOutput());
1143
1144 return $result;
1145 }
1146}
static getFileInfo(int $objectId, bool $checkRights=true, bool $copyInLocalStorage=false)
Определения disk.php:72
static addToBlock(int $blockId, $fileId, bool $temp=false)
Определения file.php:305
static deleteFromBlock($blockId, $fileId=array())
Определения file.php:363
static getFilesFromBlockContent($blockId, $content)
Определения file.php:374
static sanitize($value, &$bad=false, $splitter=' ')
Определения manager.php:1310
static savePicture($file, $ext=false, $params=array())
Определения manager.php:590
static getById($block, array $params=array())
Определения block.php:901
static cloneCard($lid, $block, $selector, bool $preventHistory=false)
Определения block.php:101
static getRepository($section=null)
Определения block.php:1022
static publication($block)
Определения block.php:795
static getManifestFile($code)
Определения block.php:987
static addCard($lid, $block, $selector, $content, bool $preventHistory=false)
Определения block.php:118
static removeCard($lid, $block, $selector, bool $preventHistory=false)
Определения block.php:142
static getContentFromRepository($code)
Определения block.php:1007
static uploadFile($block, $picture, $ext=false, array $params=[], $temp=false)
Определения block.php:1050
static updateCards($lid, $block, array $data)
Определения block.php:157
static updateStyles($lid, $block, array $data, bool $preventHistory=false)
Определения block.php:590
static getFileDisk(int $fileId)
Определения block.php:1100
static getContent($lid, $block, $editMode=false, array $params=array())
Определения block.php:638
static getAssetsConfig(array $extCodes, array $tplCodes=[])
Определения block.php:1125
static getManifest($lid, $block, array $params=array())
Определения block.php:939
static updateAttrs($lid, $block, array $data)
Определения block.php:609
static changeNodeName($lid, $block, array $data, bool $preventHistory=false)
Определения block.php:204
static updateContent($lid, $block, $content, $designed=false, bool $preventHistory=false)
Определения block.php:694
static getList($lid, array $params=array())
Определения block.php:825
static updateNodes($lid, $block, array $data, array $additional=array(), bool $preventHistory=false)
Определения block.php:330
static changeAnchor($lid, $block, $data, bool $preventHistory=false)
Определения block.php:281
static isTrue($value)
Определения utils.php:437
$content
Определения commerceml.php:144
$data['IS_AVAILABLE']
Определения .description.php:13
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения file_new.php:804
$res
Определения filter_act.php:7
$result
Определения get_property_values.php:14
if(!is_null($config))($config as $configItem)(! $configItem->isVisible()) $code
Определения options.php:195
Определения builder.php:3
Определения ai.php:3
Определения page.php:2
Определения cache.php:2
Определения agent.php:3
Определения Image.php:9
$i
Определения factura.php:643
</p ></td >< td valign=top style='border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 2.0pt 0cm 2.0pt;height:9.0pt'>< p class=Normal align=center style='margin:0cm;margin-bottom:.0001pt;text-align:center;line-height:normal'>< a name=ТекстовоеПоле54 ></a ><?=($taxRate > count( $arTaxList) > 0) ? $taxRate."%"
Определения waybill.php:936
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799
$method
Определения index.php:27
$error
Определения subscription_card_product.php:20
$action
Определения file_dialog.php:21