Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
helper.php
1<?php
10
11use Bitrix\Crm\Service\Container;
18use Bitrix\Main\Orm;
20use Bitrix\Main\UI\Filter\Type as UiFilterType;
26
27Loc::loadMessages(__FILE__);
28
33class Helper
34{
35 public static $runtimeByEntity = [];
36 private const PERSONALIZE_NAMESPACE = "\\Bitrix\\Sender\\Integration\\Crm\\Connectors\\Personalize\\";
37
45 public static function createExpressionMultiField($entityName, $multiFieldTypeId)
46 {
47 $sqlHelper = Application::getConnection()->getSqlHelper();
48 return new Orm\Fields\ExpressionField(
49 $multiFieldTypeId,
50 '(' . $sqlHelper->getTopSql(
51 "
52 SELECT FM.VALUE
53 FROM b_crm_field_multi FM
54 WHERE FM.ENTITY_ID = '$entityName'
55 AND FM.ELEMENT_ID = %s
56 AND FM.TYPE_ID = '$multiFieldTypeId'
57 ORDER BY
58 CASE FM.VALUE_TYPE
59 WHEN 'MAILING' THEN 0
60 WHEN 'HOME' THEN 1
61 WHEN 'MOBILE' THEN 1
62 ELSE 2
63 END,
64 FM.ID
65 ",
66 1
67 ) . ')',
68 'ID'
69 );
70 }
71
77 public static function getPersonalizeList()
78 {
79 return array(
80 array('CODE' => 'CRM_ENTITY_TYPE'),
81 array('CODE' => 'CRM_ENTITY_TYPE_ID'),
82 array('CODE' => 'CRM_ENTITY_ID'),
83 );
84 }
85
86 public static function buildPersonalizeList($entityType)
87 {
88 $documentClass = self::PERSONALIZE_NAMESPACE.ucfirst($entityType);
89
90 if(!is_subclass_of($documentClass, BasePersonalize::class))
91 {
92 return [];
93 }
94
95 $fields = $documentClass::isFactoryBased($entityType)
96 ? FactoryBased::getEntityFields($entityType)
97 : $documentClass::getEntityFields($entityType);
98
99 if(!$fields)
100 {
101 return [];
102 }
103
104 return static::preparePersonalizeList($entityType, $fields);
105 }
106
107 public static function preparePersonalizeList(string $entityType, array $fields): array
108 {
109 $result = [];
110 $items = [];
111
112 $counter = 0;
113 foreach ($fields as $fieldCode => $field)
114 {
115 $items[$counter++] = [
116 'CODE' => $entityType.'.'.$fieldCode,
117 'NAME' => $field['Name'],
118 'DESC' => $field['Name'],
119 ];
120 if(isset($field['personalizeCode']) && $field['personalizeCode'])
121 {
122 $items[$counter - 1]['CODE'] = implode(
123 "##",
124 Integration\Crm\Connectors\Personalize\BasePersonalize::getMap()[$field['personalizeCode']]
125 );
126 }
127 }
128
129 $name = Loc::getMessage('SENDER_INTEGRATION_CRM_CONNECTOR_'.$entityType);
130 if (Loader::includeModule('crm'))
131 {
132 $name = \CCrmOwnerType::GetDescription(\CCrmOwnerType::ResolveID($entityType));
133 }
134 $result[] = [
135 'CODE' => $entityType,
136 'NAME' => $name,
137 'ITEMS' => $items
138 ];
139
140 return $result;
141 }
142
143 public static function getData($entityType, $entityIds, $fields = ['*'])
144 {
145 $documentClass = self::PERSONALIZE_NAMESPACE.ucfirst($entityType);
146
147 if(!is_subclass_of($documentClass, BasePersonalize::class))
148 {
149 return [];
150 }
151
152 return $documentClass::isFactoryBased($entityType)
153 ? FactoryBased::getData($entityType, $entityIds, $fields)
154 : $documentClass::getData($entityType, $entityIds, $fields)
155 ;
156 }
157
158 public static function getPersonalizeFieldsFromConnectors($isTrigger = false)
159 {
160 $connectors = Connector\Manager::getConnectorList();
161 $items = [];
162
163 foreach ($connectors as $connector)
164 {
165 if(!($connector instanceof Connector\BaseFilter))
166 {
167 continue;
168 }
169
170 if(method_exists($connector, 'getPersonalizeList'))
171 {
172 $list = $connector->getPersonalizeList();
173 if($isTrigger)
174 {
175 foreach ($list as $key => $data)
176 {
177 if(isset($data['ITEMS']) && in_array($data['CODE'], ['LEAD', 'CONTACT', 'COMPANY']))
178 {
179 unset($list[$key]);
180 }
181 }
182 }
183 if(!empty($list))
184 {
185 $items = array_merge($items, $list);
186 }
187 }
188 }
189 return $items;
190 }
191
200 public static function getFilterUserFields(int $entityTypeId, bool $checkAccessRights = true): array
201 {
202 $list = array();
203 $ufManager = is_object($GLOBALS['USER_FIELD_MANAGER']) ? $GLOBALS['USER_FIELD_MANAGER'] : null;
204 if (!$ufManager)
205 {
206 return $list;
207 }
208
209 $ufEntityId = \CCrmOwnerType::resolveUserFieldEntityID($entityTypeId);
210 $crmUserType = new \CCrmUserType($ufManager, $ufEntityId);
211 $logicFilter = array();
212 $fieldsParams = [];
213
214 if (!$checkAccessRights)
215 {
216 $fieldsParams = ['skipUserFieldVisibilityCheck' => true];
217 }
218 $crmUserType->prepareListFilterFields($list, $logicFilter, $fieldsParams);
219 $originalList = $crmUserType->getFields($fieldsParams);
220 $restrictedTypes = ['address', 'file', 'crm', 'resourcebooking'];
221
222 $list = array_filter(
223 $list,
224 function ($field) use ($originalList, $restrictedTypes)
225 {
226 if (empty($originalList[$field['id']]))
227 {
228 return false;
229 }
230
231 $type = $originalList[$field['id']]['USER_TYPE']['USER_TYPE_ID'];
232 return !in_array($type, $restrictedTypes);
233 }
234 );
235
236 foreach ($list as $index => $field)
237 {
238 if ($field['type'] === 'date')
239 {
240 $list[$index]['include'] = [
241 AdditionalDateType::CUSTOM_DATE,
242 AdditionalDateType::PREV_DAY,
243 AdditionalDateType::NEXT_DAY,
244 AdditionalDateType::MORE_THAN_DAYS_AGO,
245 AdditionalDateType::AFTER_DAYS,
246 ];
247 if (!isset($list[$index]['allow_years_switcher']))
248 {
249 $list[$index]['allow_years_switcher'] = true;
250 }
251 }
252 if ($originalList[$field['id']]['MULTIPLE'] == 'Y')
253 {
254 $list[$index]['multiple_uf'] = true;
255 }
256 }
257
258 return $list;
259 }
260
268 public static function prepareQuery(
269 Entity\Query $query,
270 $dataTypeId = null,
271 $entityDbName = null,
272 $entityName = null
273 )
274 {
275 $map = array(
276 Recipient\Type::EMAIL => [
277 'name' => 'HAS_EMAIL',
278 'operator' => '=',
279 'value' => 'Y'
280 ],
281 Recipient\Type::PHONE => [
282 'name' => 'HAS_PHONE',
283 'operator' => '=',
284 'value' => 'Y'
285 ],
286 Recipient\Type::IM => [
287 'name' => 'HAS_IMOL',
288 'operator' => '=',
289 'value' => 'Y'
290 ],
291 Recipient\Type::CRM_CONTACT_ID => [
292 'name' => 'CONTACT_ID',
293 'operator' => null,
294 'value' => null
295 ],
296 Recipient\Type::CRM_COMPANY_ID => [
297 'name' => 'COMPANY_ID',
298 'operator' => null,
299 'value' => null
300 ],
301 );
302
303 $entityName = $entityName ?? mb_strtoupper($query->getEntity()->getName());
304
305 if ($dataTypeId)
306 {
307 if (!isset($map[$dataTypeId]))
308 {
309 return $query;
310 }
311
312 $field = $map[$dataTypeId];
313
314 if($field['operator'] === null)
315 {
316 return $query;
317 }
318
319 if ($dataTypeId == Recipient\Type::CRM_COMPANY_ID && in_array($entityName, ['CONTACT']))
320 {
321 $field['name'] = 'CRM_COMPANY_ID';
322 }
323
324 $query->where($field['name'], $field['operator'], $field['value']);
325 if ($dataTypeId === Recipient\Type::IM)
326 {
327 $query->whereExists(self::getImSqlExpression($query, $entityDbName, $entityName));
328 }
329 }
330 else if (!in_array($entityName, ['CONTACT', 'COMPANY']))
331 {
332 $filter = Entity\Query::filter();
333 foreach ($map as $dataTypeId => $field)
334 {
335 if($field['operator'] === null)
336 {
337 continue;
338 }
339 if ($dataTypeId === Recipient\Type::IM)
340 {
341 $filter->where(
342 Entity\Query::filter()
343 ->where($field['name'], $field['operator'], $field['value'])
344 ->whereExists(self::getImSqlExpression($query, $entityDbName, $entityName))
345 );
346 }
347 else
348 {
349 $filter->where($field['name'], $field['operator'], $field['value']);
350 }
351 }
352
353 if (count($filter->getConditions()) > 0)
354 {
355 $filter->logic('or');
356 $query->where($filter);
357 }
358 }
359
360
361 return $query;
362 }
363
364 protected static function getImSqlExpression(
365 Entity\Query $query,
366 $entityDbName = null,
367 $entityName = null
368 )
369 {
370 $codes = Integration\Im\Service::getExcludedChannelCodes();
371 if (empty($codes))
372 {
373 $codes = array('livechat', 'network');
374 }
375
376 $column = $entityDbName ? 'CRM_ENTITY_ID' : 'ID';
377
378 $entityTypeName = $entityName ?? mb_strtoupper($query->getEntity()->getName());
379
380 $sqlHelper = Application::getConnection()->getSqlHelper();
381 $regexp = "'^imol\\\\|(" . implode('|', $codes) . ")'";
382
383 $filterImolSql = "SELECT FM.VALUE " .
384 "FROM b_crm_field_multi FM " .
385 "WHERE FM.ENTITY_ID = '$entityTypeName' AND FM.ELEMENT_ID = ?#.{$column} " .
386 "AND FM.TYPE_ID = 'IM' " .
387 "AND NOT {$sqlHelper->getRegexpOperator('FM.VALUE', $regexp)} " .
388 "ORDER BY FM.ID LIMIT 1";
389
390 return new SqlExpression($filterImolSql, $query->getInitAlias());
391 }
392
399 public static function getRuntimeByEntity($entityTypeName = '')
400 {
401 if (isset(self::$runtimeByEntity[$entityTypeName]))
402 {
403 return self::$runtimeByEntity[$entityTypeName];
404 }
405
406 return [];
407 }
408
409 protected static function processRuntimeFilter(array &$filter, $entityTypeName = '')
410 {
411 foreach ($filter as $key => $item)
412 {
413 if (!($item instanceof Connector\Filter\RuntimeFilter))
414 {
415 continue;
416 }
417
418 unset($filter[$key]);
419 $filter[$item->getKey()] = $item->getValue();
420 if (empty(self::$runtimeByEntity[$entityTypeName]))
421 {
422 self::$runtimeByEntity[$entityTypeName] = [];
423 }
424 self::$runtimeByEntity[$entityTypeName] = array_merge(
425 self::$runtimeByEntity[$entityTypeName],
426 array_map(
427 function ($item) use ($entityTypeName)
428 {
429 $search = $entityTypeName ? $entityTypeName . '_' : '';
430 $runtimeName = $entityTypeName ? $entityTypeName . '.' : '';
431 $item['expression'] = str_replace(
432 $search,
433 $runtimeName,
434 $item['expression']
435 );
436 $item['buildFrom'] = array_map(
437 function ($from) use ($search, $runtimeName)
438 {
439 return str_replace($search, $runtimeName, $from);
440 },
441 $item['buildFrom']
442 );
443 return $item;
444 },
445 $item->getRuntime()
446 )
447 );
448 }
449 }
450
459 public static function getFilterByEntity(array $fields = array(), array $values = array(), array $entityTypeNames = array())
460 {
461 $map = array();
462 foreach ($entityTypeNames as $entityTypeName)
463 {
464 $map[$entityTypeName] = array($entityTypeName);
465 }
466 $map['CLIENT'] = array(\CCrmOwnerType::CompanyName, \CCrmOwnerType::ContactName);
467 $map[\CCrmOwnerType::CompanyName] = array(\CCrmOwnerType::CompanyName);
468 $map[\CCrmOwnerType::ContactName] = array(\CCrmOwnerType::ContactName);
469
470 $result = array();
471 foreach ($fields as $field)
472 {
473 if (!self::isFieldFilterable($field, $values))
474 {
475 continue;
476 }
477
478 $id = $field['id'];
479 foreach ($map as $prefix => $entityTypes)
480 {
481 $search = $prefix . '_';
482 if (mb_strpos($id, $search) !== 0)
483 {
484 continue;
485 }
486
487 foreach ($entityTypes as $entityTypeName)
488 {
489 $filterKey = "$entityTypeName.".mb_substr($id, mb_strlen($search));
490 if (!self::isFieldTypeFilter($field['type']))
491 {
492 $filterKey = "=$filterKey";
493 }
494 if ($field['multiple_uf'] ?? false)
495 {
496 $filterKey .= "_SINGLE";
497 }
498
499 $field['sender_segment_filter'] = $filterKey;
500 if (!isset($result[$entityTypeName]))
501 {
502 $result[$entityTypeName] = array();
503 }
504
505 $result[$entityTypeName][] = $field;
506 }
507
508 break;
509 }
510 }
511
512 self::$runtimeByEntity = [];
513 foreach ($result as $entityTypeName => $fields)
514 {
515 $items = self::getFilterByFields($fields, $values, $entityTypeName);
516
517 $result[$entityTypeName] = $items;
518 }
519
520 return $result;
521 }
522
523 private static function isFieldFilterable(array $field = array(), array $values = array())
524 {
525 $id = $field['id'];
526 $codeKey = 'sender_segment_filter';
527 if (isset($field[$codeKey]) && $field[$codeKey] === false)
528 {
529 return false;
530 }
531
532 if (!isset($values[$id]) || (!$values[$id] && !is_numeric($values[$id])))
533 {
534 return false;
535 }
536
537 return true;
538 }
539
548 public static function getFilterByFields(array $fields = array(), array $values = array(), $entityTypeName = '')
549 {
550 if ($entityTypeName)
551 {
552 if (!empty(self::$runtimeByEntity[$entityTypeName]))
553 {
554 self::$runtimeByEntity[$entityTypeName] = [];
555 }
556 }
557 else
558 {
559 self::$runtimeByEntity = [];
560 }
561
562 $filter = array();
563 foreach ($fields as $field)
564 {
565 if (!self::isFieldFilterable($field, $values))
566 {
567 continue;
568 }
569
570 $isMultiple = false;
571 if (isset($field['params']) && is_array($field['params']))
572 {
573 if (isset($field['params']['multiple']) && $field['params']['multiple'])
574 {
575 $isMultiple = true;
576 }
577 }
578
579 $id = $field['id'];
580 $value = $values[$id];
581 $value = $isMultiple && !is_array($value) ? array($value) :
582 ($value === "" ? null:$value);
583
584 if($isMultiple)
585 {
586 foreach($value as &$val)
587 {
588 if($val === "")
589 {
590 $val = null;
591 }
592 }
593 }
594
595 $field['value'] = $value;
596
597 if ($field['filter_callback'] ?? false)
598 {
599 $extraCallbackParams = [
600 'FIELD' => $field,
601 'ENTITY_TYPE_NAME' => $entityTypeName
602 ];
603 call_user_func_array($field['filter_callback'], [$value, &$filter, $extraCallbackParams]);
604 continue;
605 }
606
607 $filterKey = self::getFilterFieldKey($field);
608 if (is_array($filterKey))
609 {
610 foreach ($filterKey as $fieldValue => $fieldFilter)
611 {
612 if ($value !== $fieldValue)
613 {
614 continue;
615 }
616
617 $filter[$fieldFilter[0]] = $fieldFilter[1];
618 }
619 }
620 elseif (self::isFieldTypeFilter($field['type']))
621 {
622 self::setFieldTypeFilter($filterKey, $field, $filter);
623 self::processRuntimeFilter($filter, $entityTypeName);
624 }
625 else
626 {
627 $filter[$filterKey] = $value;
628 }
629 }
630
631 return $filter;
632 }
633
634 protected static function getFilterFieldKey(array $field)
635 {
636 $codeKey = 'sender_segment_filter';
637
638 $id = $field['id'];
639 if (isset($field[$codeKey]) && $field[$codeKey])
640 {
641 return $field[$codeKey];
642 }
643
644 if (self::isFieldTypeFilter($field['type']))
645 {
646 return "$id";
647 }
648
649 return "=$id";
650 }
651
652 protected static function isFieldTypeFilter($type)
653 {
654 $types = array(
658 );
659 return in_array(mb_strtoupper($type), $types);
660 }
661
662 protected static function setFieldTypeFilter($filterKey, array $fieldData, &$filter)
663 {
664 $fieldData['filter-key'] = $filterKey;
665 switch(mb_strtoupper($fieldData['type']))
666 {
668 Connector\Filter\DateField::create($fieldData)->applyFilter($filter);
669 break;
671 Connector\Filter\NumberField::create($fieldData)->applyFilter($filter);
672 break;
674 Connector\Filter\DestSelectorField::create($fieldData)->applyFilter($filter);
675 break;
676 }
677 }
678
679 protected static function getCommunicationTypeFilter(array $commTypes, &$filter, $extraCallbackParams = [])
680 {
681 if (in_array(\CCrmFieldMulti::PHONE, $commTypes))
682 {
683 $filter['=HAS_PHONE'] = 'Y';
684 }
685 if (in_array(\CCrmFieldMulti::EMAIL, $commTypes))
686 {
687 $filter['=HAS_EMAIL'] = 'Y';
688 }
689 if (in_array(\CCrmFieldMulti::IM, $commTypes))
690 {
691 $filter['=HAS_IMOL'] = 'Y';
692 }
693 }
694
695 protected static function getIdFilter($value, &$filter)
696 {
697 if (is_array($value))
698 {
699 $value = $value[0];
700 }
701
702 $filter['@CRM_ENTITY_ID'] = array_map('trim', explode(",", $value));
703 }
704
705 protected static function getNoPurchasesFilter($value, &$filter, $extraCallbackParams = [])
706 {
707 $entityTypeName = $extraCallbackParams['ENTITY_TYPE_NAME'];
708 $field = $extraCallbackParams['FIELD'];
709 if (!$entityTypeName)
710 return;
711
712 if ($value[$field['id'] . '_datesel'] != 'NONE')
713 {
714 $filter['NO_PURCHASES'] = [];
715 self::setFieldTypeFilter('%PURCHASE_DATE%', $field, $filter['NO_PURCHASES']);
716 self::processRuntimeFilter($filter['NO_PURCHASES'], $entityTypeName);
717 }
718 }
719
720 protected static function productSourceFilter($value, &$filter, $extraCallbackParams = [])
721 {
722 if ($filter['NO_PURCHASES'] || $filter['=COMPANY.PRODUCT_ID'] || $filter['=CONTACT.PRODUCT_ID'])
723 {
724 if (!is_array($value) || in_array("", $value)) // if PRODUCT_SOURCE wasn't set or has "everywhere" value
725 {
726 $value = [];
727 }
728 $filter['PRODUCT_SOURCE'] = $value;
729 }
730 }
731
732 protected static function getDealCategoryFilter($values, &$filter, $extraCallbackParams = [])
733 {
734 $filter['DEAL'] = [];
735 foreach ($values as $k => $value)
736 {
737 if(is_null($value))
738 {
739 $filter['DEAL'][] = ['SGT_DEAL.ID', '=', $value];
740 $filter['DEAL']['JOIN_TYPE'] = 'LEFT';
741 unset($values[$k]);
742 }
743 }
744 if(!empty($values))
745 {
746 $filter['DEAL'][] = ['SGT_DEAL.CATEGORY_ID', 'in', $values];
747 }
748 }
749
756 public function onResultViewDraw(array &$row)
757 {
758 switch ($row['CRM_ENTITY_TYPE_ID'])
759 {
760 case \CCrmOwnerType::Company:
761 $crmRow = \Bitrix\Crm\CompanyTable::getRowById($row['CRM_ENTITY_ID']);
762 $row['~NAME'] = self::getResultViewTitle(
763 $row['CRM_ENTITY_TYPE_ID'],
764 $row['CRM_ENTITY_ID'],
765 $row['NAME'],
766 \CCrmOwnerType::GetDescription($row['CRM_ENTITY_TYPE_ID']),
767 self::getCrmStatusName('COMPANY_TYPE', $crmRow['COMPANY_TYPE'])
768 );
769 break;
770 case \CCrmOwnerType::Contact:
771 $crmRow = \Bitrix\Crm\ContactTable::getRowById($row['CRM_ENTITY_ID']);
772 $row['~NAME'] = self::getResultViewTitle(
773 $row['CRM_ENTITY_TYPE_ID'],
774 $row['CRM_ENTITY_ID'],
775 $row['NAME'],
776 \CCrmOwnerType::GetDescription($row['CRM_ENTITY_TYPE_ID']),
777 self::getCrmStatusName('SOURCE', $crmRow['SOURCE_ID'])
778 );
779 break;
780 case \CCrmOwnerType::Lead:
781 $crmRow = \Bitrix\Crm\LeadTable::getRowById($row['CRM_ENTITY_ID']);
782 $row['CRM_LEAD'] = $row['~CRM_LEAD'] = self::getResultViewTitle(
783 $row['CRM_ENTITY_TYPE_ID'],
784 $row['CRM_ENTITY_ID'],
785 $crmRow['TITLE'],
786 self::getCrmStatusName('SOURCE', $crmRow['SOURCE_ID']),
787 $crmRow['IS_RETURN_CUSTOMER'] === 'Y' ? Loc::getMessage('SENDER_INTEGRATION_CRM_CONNECTOR_LEAD_FIELD_RC_LEAD') : null
788 );
789 break;
790 }
791 }
792
793 protected function getCrmStatusName($statusType, $statusId)
794 {
795 if (!$statusId)
796 {
797 return null;
798 }
799
800 $sources = \CCrmStatus::GetStatus($statusType);
801 if (empty($sources[$statusId]))
802 {
803 return $statusId;
804 }
805
806 return $sources[$statusId]['NAME'];
807 }
808
809 protected function getResultViewTitle($entityTypeId, $entityId, $title, $secondTitle = null, $thirdTitle = null)
810 {
811 $url = self::getPathToDetail($entityTypeId, $entityId);
812 $title = htmlspecialcharsbx($title);
813 if ($url && \CCrmAuthorizationHelper::checkReadPermission($entityTypeId, $entityId))
814 {
815 $title = '<a href="' . $url . '">' . $title . '</a>';
816 }
817
818 if ($secondTitle)
819 {
820 $title .= "<br><span style=\"color:grey; font-size: 12px;\">";
821 $title .= htmlspecialcharsbx($secondTitle);
822 $title .= "</span>";
823 }
824
825 if ($thirdTitle)
826 {
827 $title .= "<br><span style=\"color:grey; font-size: 12px;\">";
828 $title .= htmlspecialcharsbx($thirdTitle);
829 $title .= "</span>";
830 }
831
832 return $title;
833 }
834
835 protected function getPathToDetail($entityTypeId, $entityId)
836 {
837 if (Loader::includeModule('crm'))
838 {
839 return Container::getInstance()->getRouter()->getItemDetailUrl($entityTypeId, $entityId);
840 }
841 switch ($entityTypeId)
842 {
843 case \CCrmOwnerType::Company:
844 $optionName = 'path_to_company_details';
845 break;
846 case \CCrmOwnerType::Contact:
847 $optionName = 'path_to_contact_details';
848 break;
849 case \CCrmOwnerType::Lead:
850 $optionName = 'path_to_lead_details';
851 break;
852 default:
853 $optionName = null;
854 }
855
856 $url = $optionName ? Option::get('crm', $optionName) : null;
857 if ($url)
858 {
859 $url = str_replace(
860 ['#company_id#', '#contact_id#', '#lead_id#'],
861 $entityId,
862 $url
863 );
864 }
865
866 return $url;
867 }
868
869 public static function isCrmSaleEnabled()
870 {
871 return Loader::includeModule("sale") && (Option::get("crm", "crm_shop_enabled", "N") != 'N');
872 }
873}
static getConnection($name="")
static includeModule($moduleName)
Definition loader.php:69
static loadMessages($file)
Definition loc.php:64
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29
getResultViewTitle($entityTypeId, $entityId, $title, $secondTitle=null, $thirdTitle=null)
Definition helper.php:809
static getPersonalizeFieldsFromConnectors($isTrigger=false)
Definition helper.php:158
static getCommunicationTypeFilter(array $commTypes, &$filter, $extraCallbackParams=[])
Definition helper.php:679
static setFieldTypeFilter($filterKey, array $fieldData, &$filter)
Definition helper.php:662
static productSourceFilter($value, &$filter, $extraCallbackParams=[])
Definition helper.php:720
static preparePersonalizeList(string $entityType, array $fields)
Definition helper.php:107
static getFilterByFields(array $fields=array(), array $values=array(), $entityTypeName='')
Definition helper.php:548
static processRuntimeFilter(array &$filter, $entityTypeName='')
Definition helper.php:409
static getDealCategoryFilter($values, &$filter, $extraCallbackParams=[])
Definition helper.php:732
static getImSqlExpression(Entity\Query $query, $entityDbName=null, $entityName=null)
Definition helper.php:364
static getData($entityType, $entityIds, $fields=[' *'])
Definition helper.php:143
static prepareQuery(Entity\Query $query, $dataTypeId=null, $entityDbName=null, $entityName=null)
Definition helper.php:268
static createExpressionMultiField($entityName, $multiFieldTypeId)
Definition helper.php:45
static getFilterByEntity(array $fields=array(), array $values=array(), array $entityTypeNames=array())
Definition helper.php:459
getPathToDetail($entityTypeId, $entityId)
Definition helper.php:835
static getNoPurchasesFilter($value, &$filter, $extraCallbackParams=[])
Definition helper.php:705
static getRuntimeByEntity($entityTypeName='')
Definition helper.php:399
static getFilterUserFields(int $entityTypeId, bool $checkAccessRights=true)
Definition helper.php:200
$GLOBALS['____1444769544']
Definition license.php:1