- Модуль: iblock
- Путь к файлу: ~/bitrix/modules/iblock/lib/template/functions/fabric.php
- Класс: BitrixIblockTemplateFunctionsFunctionTranslit
- Вызов: FunctionTranslit::calculate
public function calculate(array $parameters)
{
$changeCase = false;
$replaceChar = "";
if (
isset($this->data)
&& isset($this->data["replace_space"])
&& $this->data["replace_space"] != ""
)
{
$changeCase = isset($this->data[""])? $this->data["change_case"]: false;
$replaceChar = $this->data["replace_space"];
}
if (
isset($this->data)
&& isset($this->data["change_case"])
&& $this->data["change_case"] != ""
)
{
$changeCase = $this->data["change_case"];
}
return CUtil::translit($this->parametersToString($parameters), LANGUAGE_ID, array(
//"max_len" => 50,
"change_case" => $changeCase, // 'L' - toLower, 'U' - toUpper, false - do not change
"replace_space" => $replaceChar,
"replace_other" => $replaceChar,
"delete_repeat_replace" => true,
));
}