18 public static function getValue(?EO_Workgroup $group): string
21 'sonet-ui-grid-group-avatar',
22 'ui-icon-common-user-group',
29 ? $group->getImageId()
35 $file = \CFile::getFileArray($imageId);
38 $fileResized = \CFile::resizeImageGet(
46 $classList[] =
'ui-icon';
47 $avatar =
"<i style=\"background-image: url('" . Uri::urnEncode(htmlspecialcharsbx($fileResized[
'src'])) .
"'); background-size: cover\"></i>";
52 $avatarType = (string)$group->get(
'AVATAR_TYPE');
53 if ($avatarType !==
'')
55 $classList[] =
'sonet-common-workgroup-avatar';
56 $classList[] =
'--' . htmlspecialcharsbx(
Helper\Workgroup::getAvatarTypeWebCssClass($avatarType));
60 $classList[] =
'ui-icon';
64 return '<div class="' . implode(
' ', $classList) .
'">' . $avatar .
'</div>';