1C-Bitrix 25.700.0
Загрузка...
Поиск...
Не найдено
highloadblocktable.php
См. документацию.
1<?php
2
9
10namespace Bitrix\Highloadblock;
11
12use Bitrix\Main,
13 Bitrix\Main\Application,
14 Bitrix\Main\DB\MssqlConnection,
15 Bitrix\Main\Entity;
16use Bitrix\Main\DB\SqlQueryException;
17use Bitrix\Main\Localization\Loc;
18use Bitrix\Main\ORM;
19
21
40class HighloadBlockTable extends Entity\DataManager
41{
42 private const ENTITY_ID_PREFIX = 'HLBLOCK_';
43
44 private const ENTITY_ID_MASK = '/^HLBLOCK_(\d+)$/';
45
46 private const NAME_COLLECTION = 'collection';
47
51 public static function getTableName(): string
52 {
53 return 'b_hlblock_entity';
54 }
55
56 public static function getObjectClass()
57 {
58 return HighloadBlock::class;
59 }
60
61 public static function getMap(): array
62 {
63 IncludeModuleLangFile(__FILE__);
64
65 $sqlHelper = Application::getConnection()->getSqlHelper();
66
67 return [
68 'ID' => [
69 'data_type' => 'integer',
70 'primary' => true,
71 'autocomplete' => true,
72 ],
73 'NAME' => [
74 'data_type' => 'string',
75 'required' => true,
76 'validation' => [__CLASS__, 'validateName'],
77 ],
78 'TABLE_NAME' => [
79 'data_type' => 'string',
80 'required' => true,
81 'validation' => [__CLASS__, 'validateTableName'],
82 ],
83 'FIELDS_COUNT' => [
84 'data_type' => 'integer',
85 'expression' => [
86 '(SELECT COUNT(ID) FROM b_user_field WHERE b_user_field.ENTITY_ID = '.
87 $sqlHelper->getConcatFunction("'".self::ENTITY_ID_PREFIX."'", $sqlHelper->castToChar('%s')).')',
88 'ID'
89 ],
90 ],
91 'LANG' => new Entity\ReferenceField(
92 'LANG',
93 'Bitrix\Highloadblock\HighloadBlockLangTable',
94 ['=this.ID' => 'ref.ID', 'ref.LID' => new Main\DB\SqlExpression('?', LANGUAGE_ID)],
95 ),
96 ];
97 }
98
105 public static function add(array $data)
106 {
107 $result = parent::add($data);
108
109 if (!$result->isSuccess(true))
110 {
111 return $result;
112 }
113
114 // create table in db
115 $connection = Application::getConnection();
116 $sqlHelper = $connection->getSqlHelper();
117
118 $fields = [
119 'ID' => (new Main\ORM\Fields\IntegerField('ID'))
120 ->configureSize(8)
121 ->configureNullable(false)
122 ->configurePrimary(true)
123 ->configureAutocomplete(true)
124 ,
125 ];
126
127 try
128 {
129 $connection->createTable(
130 $data['TABLE_NAME'],
131 $fields,
132 ['ID'],
133 ['ID']
134 );
135 }
136 catch (SqlQueryException $e)
137 {
138 $rowId = (int)$result->getId();
139 $connection->queryExecute('delete from ' . $sqlHelper->quote(self::getTableName()) . ' where ID = ' . $rowId);
140 $result->addError(new Main\Error(
141 Loc::getMessage(
142 'HIGHLOADBLOCK_HIGHLOAD_BLOCK_ENTITY_TABLE_CREATE_ERROR',
143 [
144 '#ERROR#' => $e->getMessage(),
145 ]
146 )
147 ));
148 }
149
150 return $result;
151 }
152
159 public static function update($primary, array $data)
160 {
161 global $USER_FIELD_MANAGER;
162
163 // get old data
164 $oldData = static::getByPrimary($primary)->fetch();
165
166 // update row
167 $result = parent::update($primary, $data);
168
169 if (!$result->isSuccess(true))
170 {
171 return $result;
172 }
173
174 // rename table in db
175 if (isset($data['TABLE_NAME']) && $data['TABLE_NAME'] !== $oldData['TABLE_NAME'])
176 {
177 $connection = Application::getConnection();
178 $sqlHelper = $connection->getSqlHelper();
179 $connection->renameTable($oldData['TABLE_NAME'], $data['TABLE_NAME']);
180
181 if ($connection instanceof MssqlConnection)
182 {
183 // rename constraint
184 $connection->query(sprintf(
185 "EXEC sp_rename %s, %s, 'OBJECT'",
186 $sqlHelper->quote($oldData['TABLE_NAME'].'_ibpk_1'),
187 $sqlHelper->quote($data['TABLE_NAME'].'_ibpk_1')
188 ));
189 }
190
191 // rename also uf multiple tables and its constraints, sequences, and triggers
193 foreach ($USER_FIELD_MANAGER->getUserFields(static::compileEntityId($oldData['ID'])) as $field)
194 {
195 if ($field['MULTIPLE'] == 'Y')
196 {
197 $oldUtmTableName = static::getMultipleValueTableName($oldData, $field);
198 $newUtmTableName = static::getMultipleValueTableName($data, $field);
199
200 $connection->renameTable($oldUtmTableName, $newUtmTableName);
201 }
202 }
203 }
204
205 return $result;
206 }
207
213 public static function delete($primary)
214 {
215 global $USER_FIELD_MANAGER;
216
217 // get old data
218 $hlblock = static::getByPrimary($primary)->fetch();
219
220 // remove row
221 $result = parent::delete($primary);
222
223 if (!$result->isSuccess(true))
224 {
225 return $result;
226 }
227
228 // get file fields
229 $fileFieldList = array();
231 $fields = $USER_FIELD_MANAGER->getUserFields(static::compileEntityId($hlblock['ID']));
232
233 foreach ($fields as $name => $field)
234 {
235 if ($field['USER_TYPE']['BASE_TYPE'] === 'file')
236 {
237 $fileFieldList[] = $name;
238 }
239 }
240
241 // delete files
242 if (!empty($fileFieldList))
243 {
244 $oldEntity = static::compileEntity($hlblock);
245
246 $query = new Entity\Query($oldEntity);
247
248 // select file ids
249 $query->setSelect($fileFieldList);
250
251 // if they are not empty
252 $filter = array('LOGIC' => 'OR');
253
254 foreach ($fileFieldList as $fileField)
255 {
256 $filter['!'.$fileField] = false;
257 }
258
259 $query->setFilter($filter);
260
261 // go
262 $iterator = $query->exec();
263
264 while ($row = $iterator->fetch())
265 {
266 foreach ($fileFieldList as $fileField)
267 {
268 if (!empty($row[$fileField]))
269 {
270 if (is_array($row[$fileField]))
271 {
272 foreach ($row[$fileField] as $value)
273 {
274 \CFile::delete($value);
275 }
276 }
277 else
278 {
279 \CFile::delete($row[$fileField]);
280 }
281 }
282 }
283 }
284 unset($row, $iterator);
285 }
286
287 $connection = Application::getConnection();
288
289 foreach ($fields as $field)
290 {
291 // delete from uf registry
292 if ($field['USER_TYPE']['BASE_TYPE'] === 'enum')
293 {
294 $enumField = new \CUserFieldEnum;
295 $enumField->DeleteFieldEnum($field['ID']);
296 }
297
298 $connection->query("DELETE FROM b_user_field_lang WHERE USER_FIELD_ID = ".$field['ID']);
299 $connection->query("DELETE FROM b_user_field WHERE ID = ".$field['ID']);
300
301 // if multiple - drop utm table
302 if ($field['MULTIPLE'] == 'Y')
303 {
304 $utmTableName = static::getMultipleValueTableName($hlblock, $field);
305 $connection->dropTable($utmTableName);
306 }
307 }
308
309 // clear uf cache
310 $managedCache = Application::getInstance()->getManagedCache();
311 if(CACHED_b_user_field !== false)
312 {
313 $managedCache->cleanDir("b_user_field");
314 }
315
316 // clear langs
317 $res = HighloadBlockLangTable::getList(array(
318 'filter' => array('ID' => $primary)
319 ));
320 while ($row = $res->fetch())
321 {
322 HighloadBlockLangTable::delete([
323 'ID' => $row['ID'],
324 'LID' => $row['LID'],
325 ]);
326 }
327
328 // clear rights
329 $res = HighloadBlockRightsTable::getList(array(
330 'filter' => array('HL_ID' => $primary)
331 ));
332 while ($row = $res->fetch())
333 {
334 HighloadBlockRightsTable::delete($row['ID']);
335 }
336
337 // drop hl table
338 $connection->dropTable($hlblock['TABLE_NAME']);
339
340 return $result;
341 }
342
347 public static function resolveHighloadblock($hlblock)
348 {
349 if (!is_array($hlblock))
350 {
351 if (is_int($hlblock) || is_numeric(mb_substr($hlblock, 0, 1)))
352 {
353 // we have an id
354 $hlblock = HighloadBlockTable::getByPrimary(
355 $hlblock,
356 [
357 'cache' => [
358 'ttl' => 86400,
359 ],
360 ]
361 )->fetch();
362 }
363 elseif (is_string($hlblock) && $hlblock !== '')
364 {
365 // we have a name
366 $hlblock = HighloadBlockTable::query()
367 ->addSelect('*')
368 ->setCacheTtl(86400)
369 ->where('NAME', $hlblock)
370 ->exec()
371 ->fetch()
372 ;
373 }
374 else
375 {
376 $hlblock = null;
377 }
378 }
379 if (empty($hlblock))
380 return null;
381
382 if (!isset($hlblock['ID']))
383 return null;
384 if (!isset($hlblock['NAME']) || !preg_match('/^[a-z0-9_]+$/i', $hlblock['NAME']))
385 return null;
386 if (empty($hlblock['TABLE_NAME']))
387 return null;
388
389 return $hlblock;
390 }
391
399 public static function compileEntity($hlblock, bool $force = false)
400 {
401 global $USER_FIELD_MANAGER;
402
403 $rawBlock = $hlblock;
404 $hlblock = static::resolveHighloadblock($hlblock);
405 if (empty($hlblock))
406 {
407 throw new Main\SystemException(sprintf(
408 "Invalid highloadblock description '%s'.", mydump($rawBlock)
409 ));
410 }
411 unset($rawBlock);
412
413 if (class_exists($hlblock['NAME'] . 'Table') && !$force)
414 {
415 return Main\ORM\Entity::getInstance($hlblock['NAME']);
416 }
417
418 // generate entity & data manager
419 $fieldsMap = array();
420
421 // add ID
422 $fieldsMap['ID'] = array(
423 'data_type' => 'integer',
424 'primary' => true,
425 'autocomplete' => true
426 );
427
428 // build datamanager class
429 $entityName = $hlblock['NAME'];
430 $entityDataClass = $hlblock['NAME'].'Table';
431
432 if (class_exists($entityDataClass))
433 {
434 // rebuild if it's already exists
435 Main\ORM\Entity::destroy($entityDataClass);
436 }
437 else
438 {
439 $entityTableName = $hlblock['TABLE_NAME'];
440
441 // make with an empty map
442 $eval = '
443 class '.$entityDataClass.' extends '.__NAMESPACE__.'\DataManager
444 {
445 public static function getTableName()
446 {
447 return '.var_export($entityTableName, true).';
448 }
449
450 public static function getMap()
451 {
452 return '.var_export($fieldsMap, true).';
453 }
454
455 public static function getHighloadBlock()
456 {
457 return '.var_export($hlblock, true).';
458 }
459 }
460 ';
461
462 eval($eval);
463 }
464
465 // then configure and attach fields
467 $entity = $entityDataClass::getEntity();
468
470 $uFields = $USER_FIELD_MANAGER->getUserFields(static::compileEntityId($hlblock['ID']));
471
472 foreach ($uFields as $uField)
473 {
474 if ($uField['MULTIPLE'] == 'N')
475 {
476 // just add single field
477 $params = array(
478 'required' => $uField['MANDATORY'] == 'Y'
479 );
480 $field = $USER_FIELD_MANAGER->getEntityField($uField, $uField['FIELD_NAME'], $params);
481 $entity->addField($field);
482 foreach ($USER_FIELD_MANAGER->getEntityReferences($uField, $field) as $reference)
483 {
484 $entity->addField($reference);
485 }
486 }
487 else
488 {
489 // build utm entity
490 static::compileUtmEntity($entity, $uField);
491 }
492 }
493
494 return Main\ORM\Entity::getInstance($entityName);
495 }
496
501 public static function compileEntityId($id)
502 {
503 return self::ENTITY_ID_PREFIX.$id;
504 }
505
506 public static function OnBeforeUserTypeAdd($field)
507 {
508 if (preg_match(self::ENTITY_ID_MASK, $field['ENTITY_ID'], $matches))
509 {
510 if (mb_substr($field['FIELD_NAME'], -4) == '_REF')
511 {
516 global $APPLICATION;
517
518 $APPLICATION->ThrowException(
519 Main\Localization\Loc::getMessage('HIGHLOADBLOCK_HIGHLOAD_BLOCK_ENTITY_FIELD_NAME_REF_RESERVED')
520 );
521
522 return false;
523 }
524 else
525 {
526 return array('PROVIDE_STORAGE' => false);
527 }
528 }
529
530 return true;
531 }
532
533 public static function onAfterUserTypeAdd($field)
534 {
536
537 if (preg_match(self::ENTITY_ID_MASK, $field['ENTITY_ID'], $matches))
538 {
539 $field['USER_TYPE'] = $USER_FIELD_MANAGER->getUserType($field['USER_TYPE_ID']);
540
541 // get entity info
542 $hlblockId = $matches[1];
543 $hlblock = HighloadBlockTable::getById($hlblockId)->fetch();
544
545 if (empty($hlblock))
546 {
547 $APPLICATION->throwException(sprintf(
548 'Entity "'.static::compileEntityId('%s').'" wasn\'t found.', $hlblockId
549 ));
550
551 return false;
552 }
553
554 // get usertype info
555 $sqlColumnType = $USER_FIELD_MANAGER->getUtsDBColumnType($field);
556
557 // create field in db
558 $connection = Application::getConnection();
559 $sqlHelper = $connection->getSqlHelper();
560
561 $connection->query(sprintf(
562 'ALTER TABLE %s ADD %s %s',
563 $sqlHelper->quote($hlblock['TABLE_NAME']), $sqlHelper->quote($field['FIELD_NAME']), $sqlColumnType
564 ));
565
566 if ($field['MULTIPLE'] == 'Y')
567 {
568 // create table for this relation
569 $hlentity = static::compileEntity($hlblock, true);
570 $utmEntity = Entity\Base::getInstance(HighloadBlockTable::getUtmEntityClassName($hlentity, $field));
571
572 $utmEntity->createDbTable();
573
574 // add indexes
575 $connection->query(sprintf(
576 'CREATE INDEX %s ON %s (%s)',
577 $sqlHelper->quote('IX_UTM_HL'.$hlblock['ID'].'_'.$field['ID'].'_ID'),
578 $sqlHelper->quote($utmEntity->getDBTableName()),
579 $sqlHelper->quote('ID')
580 ));
581
582 $connection->query(sprintf(
583 'CREATE INDEX %s ON %s (%s)',
584 $sqlHelper->quote('IX_UTM_HL'.$hlblock['ID'].'_'.$field['ID'].'_VALUE'),
585 $sqlHelper->quote($utmEntity->getDBTableName()),
586 $sqlHelper->quote('VALUE')
587 ));
588 }
589
590 return array('PROVIDE_STORAGE' => false);
591 }
592
593 return true;
594 }
595
596 public static function OnBeforeUserTypeDelete($field)
597 {
598 global $USER_FIELD_MANAGER;
599
600 if (preg_match(self::ENTITY_ID_MASK, $field['ENTITY_ID'], $matches))
601 {
602 // get entity info
603 $hlblockId = $matches[1];
604 $hlblock = HighloadBlockTable::getById($hlblockId)->fetch();
605
606 if (empty($hlblock))
607 {
608 // non-existent or zombie. let it go
609 return array('PROVIDE_STORAGE' => false);
610 }
611
613 $fieldType = $USER_FIELD_MANAGER->getUserType($field["USER_TYPE_ID"]);
614
615 if ($fieldType['BASE_TYPE'] == 'file')
616 {
617 // if it was file field, then delete all files
618 $entity = static::compileEntity($hlblock);
619
621 $dataClass = $entity->getDataClass();
622
623 $rows = $dataClass::getList(array('select' => array($field['FIELD_NAME'])));
624
625 while ($oldData = $rows->fetch())
626 {
627 if (empty($oldData[$field['FIELD_NAME']]))
628 {
629 continue;
630 }
631
632 if(is_array($oldData[$field['FIELD_NAME']]))
633 {
634 foreach($oldData[$field['FIELD_NAME']] as $value)
635 {
636 \CFile::delete($value);
637 }
638 }
639 else
640 {
641 \CFile::delete($oldData[$field['FIELD_NAME']]);
642 }
643 }
644 }
645
646 // drop db column
647 $connection = Application::getConnection();
648 $connection->dropColumn($hlblock['TABLE_NAME'], $field['FIELD_NAME']);
649
650 // if multiple - drop utm table
651 if ($field['MULTIPLE'] == 'Y')
652 {
653 $utmTableName = static::getMultipleValueTableName($hlblock, $field);
654 $connection->dropTable($utmTableName);
655 }
656
657 return array('PROVIDE_STORAGE' => false);
658 }
659
660 return true;
661 }
662
663 protected static function compileUtmEntity(Entity\Base $hlentity, $userfield)
664 {
665 global $USER_FIELD_MANAGER;
666
667 // build utm entity
669 $hlDataClass = $hlentity->getDataClass();
670 $hlblock = $hlDataClass::getHighloadBlock();
671
672 $utmClassName = static::getUtmEntityClassName($hlentity, $userfield);
673 $utmTableName = static::getMultipleValueTableName($hlblock, $userfield);
674
675 if (class_exists($utmClassName.'Table'))
676 {
677 // rebuild if it already exists
678 Entity\Base::destroy($utmClassName.'Table');
679 $utmEntity = Entity\Base::getInstance($utmClassName);
680 }
681 else
682 {
683 // create entity from scratch
684 $utmEntity = Entity\Base::compileEntity($utmClassName, array(), array(
685 'table_name' => $utmTableName,
686 'namespace' => $hlentity->getNamespace()
687 ));
688 }
689
690 // main fields
691 $utmValueField = $USER_FIELD_MANAGER->getEntityField($userfield, 'VALUE');
692
693 $utmEntityFields = array(
694 new Entity\IntegerField('ID'),
695 $utmValueField
696 );
697
698 // references
699 $references = $USER_FIELD_MANAGER->getEntityReferences($userfield, $utmValueField);
700
701 foreach ($references as $reference)
702 {
703 $utmEntityFields[] = $reference;
704 }
705
706 foreach ($utmEntityFields as $field)
707 {
708 $utmEntity->addField($field);
709 }
710
711 // add original entity reference
712 $referenceField = new Entity\ReferenceField(
713 'OBJECT',
714 $hlentity,
715 array('=this.ID' => 'ref.ID')
716 );
717
718 $utmEntity->addField($referenceField);
719
720 // add short alias for back-reference
721 $aliasField = new Entity\ExpressionField(
722 $userfield['FIELD_NAME'].'_SINGLE',
723 '%s',
724 $utmEntity->getFullName().':'.'OBJECT.VALUE',
725 array(
726 'data_type' => get_class($utmEntity->getField('VALUE')),
727 'required' => $userfield['MANDATORY'] == 'Y'
728 )
729 );
730
731 $hlentity->addField($aliasField);
732
733 // add aliases to references
734 /*foreach ($references as $reference)
735 {
736 // todo after #44924 is resolved
737 // actually no. to make it work expression should support linking to references
738 }*/
739
740 // add serialized cache-field
741 $cacheField = new Main\ORM\Fields\ArrayField($userfield['FIELD_NAME'], array(
742 'required' => $userfield['MANDATORY'] == 'Y'
743 ));
744
745 Main\UserFieldTable::setMultipleFieldSerialization($cacheField, $userfield);
746
747 $hlentity->addField($cacheField);
748
749 return $utmEntity;
750 }
751
752 public static function getUtmEntityClassName(Entity\Base $hlentity, $userfield)
753 {
754 return $hlentity->getName().'Utm'.Main\Text\StringHelper::snake2camel($userfield['FIELD_NAME']);
755 }
756
757 public static function getMultipleValueTableName($hlblock, $userfield)
758 {
759 return $hlblock['TABLE_NAME'].'_'.mb_strtolower($userfield['FIELD_NAME']);
760 }
761
762 public static function validateName()
763 {
764 return array(
765 new Entity\Validator\Unique,
766 new Entity\Validator\Length(
767 null,
768 100,
769 array('MAX' => GetMessage('HIGHLOADBLOCK_HIGHLOAD_BLOCK_ENTITY_NAME_FIELD_LENGTH_INVALID'))
770 ),
771 new Entity\Validator\RegExp(
772 '/^[A-Z][A-Za-z0-9]*$/',
773 GetMessage('HIGHLOADBLOCK_HIGHLOAD_BLOCK_ENTITY_NAME_FIELD_REGEXP_INVALID')
774 ),
775 new Entity\Validator\RegExp(
776 '/(?<!Table)$/i',
777 GetMessage('HIGHLOADBLOCK_HIGHLOAD_BLOCK_ENTITY_NAME_FIELD_TABLE_POSTFIX_INVALID')
778 )
779 );
780 }
781
782 public static function validateTableName()
783 {
784 return array(
785 new Entity\Validator\Unique,
786 new Entity\Validator\Length(
787 null,
788 64,
789 array('MAX' => GetMessage('HIGHLOADBLOCK_HIGHLOAD_BLOCK_ENTITY_TABLE_NAME_FIELD_LENGTH_INVALID'))
790 ),
791 new Entity\Validator\RegExp(
792 '/^[a-z0-9_]+$/',
793 GetMessage('HIGHLOADBLOCK_HIGHLOAD_BLOCK_ENTITY_TABLE_NAME_FIELD_REGEXP_INVALID')
794 ),
795 array(__CLASS__, 'validateTableExisting')
796 );
797 }
798
799 public static function validateTableExisting($value, $primary, array $row, Entity\Field $field)
800 {
801 $checkName = null;
802
803 if (empty($primary))
804 {
805 // new row
806 $checkName = $value;
807 }
808 else
809 {
810 // update row
811 $oldData = static::getByPrimary($primary)->fetch();
812
813 if ($value != $oldData['TABLE_NAME'])
814 {
815 // table name has been changed for existing row
816 $checkName = $value;
817 }
818 }
819
820 if (!empty($checkName))
821 {
822 if (Application::getConnection()->isTableExists($checkName))
823 {
824 return GetMessage('HIGHLOADBLOCK_HIGHLOAD_BLOCK_ENTITY_TABLE_NAME_ALREADY_EXISTS',
825 array('#TABLE_NAME#' => $value)
826 );
827 }
828 }
829
830 return true;
831 }
832
839 public static function cleanCache(): void
840 {
841 parent::cleanCache();
842 \CIBlockPropertyDirectory::cleanCache();
843 }
844
845 public static function onBeforeAdd(ORM\Event $event): ORM\EventResult
846 {
847 return self::checkNameFieldValueToReserved($event);
848 }
849
850 public static function onBeforeUpdate(ORM\Event $event): ORM\EventResult
851 {
852 return self::checkNameFieldValueToReserved($event);
853 }
854
855 private static function checkNameFieldValueToReserved(ORM\Event $event): ORM\EventResult
856 {
858 $data = $event->getParameter('fields');
859
860 $name = $data['NAME'] ?? null;
861 if (is_string($name) && mb_strtolower($name) === self::NAME_COLLECTION)
862 {
863 $result->addError(new ORM\EntityError(
864 Loc::getMessage(
865 'HIGHLOADBLOCK_HIGHLOAD_BLOCK_ENTITY_NAME_FIELD_VALUE_IS_COLLECTION',
866 [
867 '#VALUE#' => $name,
868 ]
869 ),
870 'TABLE_NAME'
871 ));
872 }
873
874 return $result;
875 }
876}
$connection
Определения actionsdefinitions.php:38
global $APPLICATION
Определения include.php:80
static getUtmEntityClassName(Entity\Base $hlentity, $userfield)
Определения highloadblocktable.php:752
static onBeforeAdd(ORM\Event $event)
Определения highloadblocktable.php:845
static OnBeforeUserTypeAdd($field)
Определения highloadblocktable.php:506
static validateTableExisting($value, $primary, array $row, Entity\Field $field)
Определения highloadblocktable.php:799
static add(array $data)
Определения highloadblocktable.php:105
static onAfterUserTypeAdd($field)
Определения highloadblocktable.php:533
static getMultipleValueTableName($hlblock, $userfield)
Определения highloadblocktable.php:757
static resolveHighloadblock($hlblock)
Определения highloadblocktable.php:347
static onBeforeUpdate(ORM\Event $event)
Определения highloadblocktable.php:850
static update($primary, array $data)
Определения highloadblocktable.php:159
Определения error.php:15
Определения event.php:5
static loadLanguageFile($file, $language=null, $normalize=true)
Определения loc.php:225
static getInstance($entityName)
Определения entity.php:104
static snake2camel($str, bool $lowCaseFirst=false)
Определения stringhelper.php:56
$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
global $USER_FIELD_MANAGER
Определения attempt.php:6
$result
Определения get_property_values.php:14
$query
Определения get_search.php:11
$entity
$filter
Определения iblock_catalog_list.php:54
mydump($thing, $maxdepth=-1, $depth=0)
Определения tools.php:3859
IncludeModuleLangFile($filepath, $lang=false, $bReturnArray=false)
Определения tools.php:3778
GetMessage($name, $aReplace=null)
Определения tools.php:3397
$name
Определения menu_edit.php:35
Определения arrayresult.php:2
Определения ufield.php:9
$event
Определения prolog_after.php:141
if( $daysToExpire >=0 &&$daysToExpire< 60 elseif)( $daysToExpire< 0)
Определения prolog_main_admin.php:393
if($inWords) echo htmlspecialcharsbx(Number2Word_Rus(roundEx($totalVatSum $params['CURRENCY']
Определения template.php:799
$matches
Определения index.php:22
$rows
Определения options.php:264
$iterator
Определения yandex_run.php:610
$fields
Определения yandex_run.php:501