- Модуль: iblock
- Путь к файлу: ~/bitrix/modules/iblock/classes/general/cml2.php
- Класс: CIBlockCMLImport
- Вызов: CIBlockCMLImport::InitEx
function InitEx(&$next_step, $params)
{
$defaultParams = array(
"files_dir" => false,
"use_crc" => true,
"preview" => false,
"detail" => false,
"use_offers" => false,
"force_offers" => false,
"use_iblock_type_id" => false,
"table_name" => "b_xml_tree",
"translit_on_add" => false,
"translit_on_update" => false,
"translit_params" => array(
"max_len" => 255,
"change_case" => 'L', // 'L' - toLower, 'U' - toUpper, false - do not change
"replace_space" => '-',
"replace_other" => '-',
"delete_repeat_replace" => true,
),
"skip_root_section" => false,
"disable_change_price_name" => false,
"iblock_cache_mode" => self::IBLOCK_CACHE_NORMAL
);
foreach($defaultParams as $key => $value)
if(!array_key_exists($key, $params))
$params[$key] = $value;
$this->Init($next_step,
$params["files_dir"],
$params["use_crc"],
$params["preview"],
$params["detail"],
$params["use_offers"],
$params["use_iblock_type_id"],
$params["table_name"]
);
if($params["translit_on_add"])
$this->translit_on_add = $params["translit_params"];
if($params["translit_on_update"])
$this->translit_on_update = $params["translit_params"];
if ($params["disable_change_price_name"])
$this->disable_change_price_name = $params["disable_change_price_name"];
$this->skip_root_section = ($params["skip_root_section"] === true);
$this->force_offers = ($params["force_offers"] === true);
if (
$params['iblock_cache_mode'] == self::IBLOCK_CACHE_FREEZE
|| $params['iblock_cache_mode'] == self::IBLOCK_CACHE_FINAL
|| $params['iblock_cache_mode'] == self::IBLOCK_CACHE_HIT
|| $params['iblock_cache_mode'] == self::IBLOCK_CACHE_NORMAL
)
{
$this->iblockCacheMode = $params['iblock_cache_mode'];
}
}