Bitrix-D7 23.9
 
Загрузка...
Поиск...
Не найдено
FileError.php
1<?php
2
4
7
8class FileError extends Error
9{
10 public const UNKNOWN_FILE_SUBTYPE = 'UNKNOWN_FILE_SUBTYPE';
11 public const NOT_FOUND = 'FILE_NOT_FOUND';
12 public const CREATE_SYMLINK = 'CREATE_SYMLINK_ERROR';
13 public const SAVE_BEFORE_MIGRATION_ERROR = 'FILE_SAVE_BEFORE_MIGRATION_ERROR';
14
15 protected function loadErrorMessage($code, $replacements): string
16 {
17 $postfix = '';
18
19 if ($code === self::CREATE_SYMLINK)
20 {
21 $postfix = '_V3';
22 }
23
24 return Loc::getMessage("ERROR_FILE_{$code}{$postfix}", $replacements) ?: '';
25 }
26
27 protected function loadErrorDescription($code, $replacements): string
28 {
29 return Loc::getMessage("ERROR_FILE_{$code}_DESC", $replacements) ?: '';
30 }
31}
loadErrorMessage($code, $replacements)
Definition FileError.php:15
loadErrorDescription($code, $replacements)
Definition FileError.php:27
static getMessage($code, $replace=null, $language=null)
Definition loc.php:29