File manager - Edit - /home/c14075/dragmet-ural.ru/www/bitrix/modules/main/lib/ui/accessrights/avatar.php
Back
<?php /** * Bitrix Framework * @package bitrix * @subpackage tasks * @copyright 2001-2021 Bitrix */ namespace Bitrix\Main\UI\AccessRights; class Avatar { private static $cache = []; public static function getSrc($avatarId, $width = 58, $height = 58): ?string { if(empty($avatarId)) { return null; } $avatarId = (int) $avatarId; $key = $avatarId . " $width $height"; if (!isset(self::$cache[$key])) { $src = false; if ($avatarId > 0) { $imageFile = \CFile::getFileArray($avatarId); if ($imageFile !== false) { $fileTmp = \CFile::resizeImageGet( $imageFile, array("width" => $width, "height" => $height), BX_RESIZE_IMAGE_EXACT, false ); $src = $fileTmp["src"]; } self::$cache[$key] = $src; } } return self::$cache[$key]; } }
| ver. 1.4 |
Github
|
.
| PHP 7.4.33 | Generation time: 0.27 |
proxy
|
phpinfo
|
Settings