19declare(strict_types=1);
25use Psr\Http\Message\RequestInterface;
35 private readonly RequestInterface $request,
36 private readonly
Profile $profile
47 return $this->
lng->txt(
'badge_user_profile');
72 if ($this->setting->get(
'user_portfolios') !==
'1'
75 static fn(array $v):
bool => $v[
'is_default'] === 1
78 if (!in_array($user->getPref(
'public_profile'), [
'y',
'g'])) {
83 if ($config ===
null || !isset($config[
'profile'])) {
87 foreach ($config[
'profile'] as $long_field_id) {
88 $field_id = substr($long_field_id, 4);
89 if (substr($field_id, 0, 4) ===
'udf_') {
90 $field_id = substr($field_id, 4);
93 $field = $this->
profile->getFieldByIdentifier($field_id);
94 if ($field ===
null) {
97 if (!$field->isPublishedByUser($user)
98 || empty($field->retrieveValueFromUser($user))) {
getId()
Get typ id (unique for component)
isSingleton()
Can only be created once?
getConfigGUIInstance()
Get GUI config instance.
__construct(private readonly Language $lng, private readonly \ilSetting $setting, private readonly RequestInterface $request, private readonly Profile $profile)
evaluate(int $user_id, array $params, ?array $config)
Evaluate if given user has earned badge.
getValidObjectTypes()
Get valid (repository) "parent" object types.
static getPortfoliosOfUser(int $a_user_id)
Get portfolios of user.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params