14 private array $iblockFields;
27 private function getIblockFields(): array
29 if (!isset($this->iblockFields))
31 $result = CIBlock::GetArrayByID($this->
getIblockId());
32 if (!is_array($result))
37 $this->iblockFields = $result;
40 return $this->iblockFields;
50 $iblock = $this->getIblockFields();
52 $elementTranslit = $iblock[
'FIELDS'][
'CODE'][
'DEFAULT_VALUE'] ??
null;
53 if (empty($elementTranslit))
59 isset($elementTranslit[
'TRANSLITERATION'], $elementTranslit[
'USE_GOOGLE'])
60 && $elementTranslit[
'TRANSLITERATION'] ===
'Y'
61 && $elementTranslit[
'USE_GOOGLE'] !==
'Y'
63 if ($useElementTranslit)
66 'max_len' => $elementTranslit[
'TRANS_LEN'],
67 'change_case' => $elementTranslit[
'TRANS_CASE'],
68 'replace_space' => $elementTranslit[
'TRANS_SPACE'],
69 'replace_other' => $elementTranslit[
'TRANS_OTHER'],
70 'delete_repeat_replace' => ($elementTranslit[
'TRANS_EAT'] ===
'Y')
84 $iblock = $this->getIblockFields();
86 $sectionTranslit = $iblock[
'FIELDS'][
'SECTION_CODE'][
'DEFAULT_VALUE'] ??
null;
87 if (empty($sectionTranslit))
93 isset($sectionTranslit[
'TRANSLITERATION'], $sectionTranslit[
'USE_GOOGLE'])
94 && $sectionTranslit[
'TRANSLITERATION'] ===
'Y'
95 && $sectionTranslit[
'USE_GOOGLE'] !==
'Y'
97 if ($useSectionTranslit)
100 'max_len' => $sectionTranslit[
'TRANS_LEN'],
101 'change_case' => $sectionTranslit[
'TRANS_CASE'],
102 'replace_space' => $sectionTranslit[
'TRANS_SPACE'],
103 'replace_other' => $sectionTranslit[
'TRANS_OTHER'],
104 'delete_repeat_replace' => ($sectionTranslit[
'TRANS_EAT'] ===
'Y')
getElementTranslitSettings()
getSectionTranslitSettings()