1C-Bitrix
25.700.0
Toggle main menu visibility
Титульная страница
Пространства имен
Пространства имен
Члены пространств имен
Указатель
$
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
r
s
t
u
v
w
Функции
_
a
c
d
e
f
g
h
i
k
l
m
o
p
r
s
t
u
v
w
Переменные
$
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
v
w
Перечисления
a
b
c
d
e
f
g
l
m
n
o
p
r
s
t
u
v
w
Элементы перечислений
a
b
c
d
e
f
g
i
l
m
n
o
p
r
s
t
u
v
w
Структуры данных
Структуры данных
Алфавитный указатель структур данных
Иерархия классов
Поля структур
Указатель
$
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Функции
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Переменные
$
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Перечисления
Элементы перечислений
Файлы
Файлы
Список членов всех файлов
Указатель
$
(
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
б
в
к
л
о
п
с
т
ю
Функции
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Переменные
$
(
_
a
b
c
d
e
f
g
h
i
j
l
m
n
o
p
q
r
s
t
u
v
w
y
б
в
к
л
о
п
с
т
ю
Блог
Хостинг
•
Указатель
Структуры данных
Пространства имен
Файлы
Функции
Переменные
Перечисления
Элементы перечислений
Страницы
Загрузка...
Поиск...
Не найдено
file.php
См. документацию.
1
<?php
2
3
namespace
Bitrix\Socialnetwork\Integration\Main
;
4
5
class
File
6
{
7
public
static
function
getFileSource
(
8
int
$fileId,
9
int
$width
= 50,
10
int
$height = 50,
11
bool
$immediate =
false
12
): string
13
{
14
if
($fileId <= 0)
15
{
16
return
''
;
17
}
18
19
if
($file = \CFile::GetFileArray($fileId))
20
{
21
$fileInfo = \CFile::ResizeImageGet(
22
$file,
23
[
24
'width'
=>
$width
,
25
'height'
=> $height,
26
],
27
BX_RESIZE_IMAGE_EXACT
,
28
false
,
29
false
,
30
$immediate
31
);
32
33
return
$fileInfo[
'src'
];
34
}
35
36
return
''
;
37
}
7
public
static
function
getFileSource
( {
…
}
38
39
public
static
function
getFilesSources
(
40
array
$fileIds,
41
int
$width
= 50,
42
int
$height = 50,
43
bool
$immediate =
false
44
):
array
45
{
46
if
(empty($fileIds))
47
{
48
return
[];
49
}
50
51
$filesSources = array_fill_keys($fileIds,
''
);
52
53
$res
= \CFile::GetList([], [
'@ID'
=> implode(
','
, $fileIds)]);
54
while
($file =
$res
->Fetch())
55
{
56
$fileInfo = \CFile::ResizeImageGet(
57
$file,
58
[
59
'width'
=>
$width
,
60
'height'
=> $height,
61
],
62
BX_RESIZE_IMAGE_EXACT
,
63
false
,
64
false
,
65
$immediate
66
);
67
68
$filesSources[$file[
'ID'
]] = $fileInfo[
'src'
];
69
}
70
71
return
$filesSources;
72
}
39
public
static
function
getFilesSources
( {
…
}
73
}
5
class
File
{
…
};
Bitrix\Socialnetwork\Integration\Main\File
Определения
file.php:6
Bitrix\Socialnetwork\Integration\Main\File\getFilesSources
static getFilesSources(array $fileIds, int $width=50, int $height=50, bool $immediate=false)
Определения
file.php:39
Bitrix\Socialnetwork\Integration\Main\File\getFileSource
static getFileSource(int $fileId, int $width=50, int $height=50, bool $immediate=false)
Определения
file.php:7
array
</td ></tr ></table ></td ></tr >< tr >< td class="bx-popup-label bx-width30"><?=GetMessage("PAGE_NEW_TAGS")?> array( $site)
Определения
file_new.php:804
$res
$res
Определения
filter_act.php:7
BX_RESIZE_IMAGE_EXACT
const BX_RESIZE_IMAGE_EXACT
Определения
constants.php:12
Bitrix\Socialnetwork\Integration\Main
Определения
file.php:3
$width
$width
Определения
html.php:68
bitrix
modules
socialnetwork
lib
integration
main
file.php
Создано системой
1.14.0