2021-09-08 10:05:09 +03:00
|
|
|
<?php
|
|
|
|
|
|
|
|
/**
|
|
|
|
* PHP version 7.1
|
|
|
|
*
|
|
|
|
* @category Integration
|
|
|
|
* @package Intaro\RetailCrm\Controller\Loyalty
|
|
|
|
* @author RetailCRM <integration@retailcrm.ru>
|
|
|
|
* @license MIT
|
|
|
|
* @link http://retailcrm.ru
|
|
|
|
* @see http://retailcrm.ru/docs
|
|
|
|
*/
|
|
|
|
|
|
|
|
namespace Intaro\RetailCrm\Controller;
|
|
|
|
|
|
|
|
use Bitrix\Main\Engine\Controller;
|
|
|
|
use CModule;
|
|
|
|
use Intaro\RetailCrm\Service\Hl;
|
|
|
|
|
|
|
|
/**
|
2024-04-29 11:44:31 +03:00
|
|
|
* @category Integration
|
|
|
|
* @package Intaro\RetailCrm\Controller
|
|
|
|
* @author RetailCRM <integration@retailcrm.ru>
|
|
|
|
* @license MIT
|
|
|
|
* @link http://retailcrm.ru
|
|
|
|
* @see http://retailcrm.ru/docs
|
2021-09-08 10:05:09 +03:00
|
|
|
*/
|
|
|
|
class Icml extends Controller
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* @param string|null $tableName
|
|
|
|
*
|
|
|
|
* @return array
|
|
|
|
*/
|
|
|
|
public function getHlTableAction(?string $tableName): array
|
|
|
|
{
|
|
|
|
$hlBlockList = [];
|
|
|
|
|
|
|
|
CModule::IncludeModule('highloadblock');
|
|
|
|
$entity = Hl::getBaseEntityByTableName($tableName ?? null);
|
|
|
|
|
|
|
|
if ($entity) {
|
|
|
|
$hbFields = $entity->getFields();
|
|
|
|
$hlBlockList['table'] = $entity->getDBTableName();
|
|
|
|
|
|
|
|
foreach ($hbFields as $hbFieldCode => $hbField) {
|
|
|
|
$hlBlockList['fields'][] = $hbFieldCode;
|
|
|
|
}
|
|
|
|
|
|
|
|
return $hlBlockList;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|