19 declare(strict_types=1);
46 $this->lom_services = $dic->learningObjectMetadata();
54 return $this->context_collection
63 $ref_id = $current_context->getReferenceId()->toInt();
67 && $this->dic->access()->checkAccess(
'visible',
'',
$ref_id)
82 $additional_locale_count = 0;
83 $additional_locales = [];
86 if ($language_code !== $object_translation->getDefaultLanguage()) {
87 $additional_locales[] = $language_code;
88 $additional_locale_count++;
96 $this->
globalScreen()->layout()->meta()->addOpenGraphMetaDatum(
97 $this->data->openGraphMetadata()->website(
103 $object_translation->getDefaultLanguage(),
104 (1 < $additional_locale_count) ? array_slice($additional_locales, 1) : []
111 $uri = $this->data->uri(ILIAS_HTTP_PATH);
113 $this->
globalScreen()->layout()->meta()->addOpenGraphMetaDatum(
114 $this->data->openGraphMetadata()->website(
117 $this->dic->language()->txt(
'permission_denied'),
132 $current_object =
null;
134 return $current_object;
140 $image_path_resolver = new \ilImagePathResolver();
142 return $this->data->openGraphMetadata()->image(
144 ILIAS_HTTP_PATH . ltrim(
145 $image_path_resolver->resolveImagePath(
160 $languages_path = $this->lom_services->paths()->languages();
161 $reader = $this->lom_services->read($object_id, 0, $object_type, $languages_path);
162 foreach ($reader->allData($languages_path) as $lang_data) {
163 yield $lang_data->value();
170 $this->dic->globalScreen()->tool()->context()->availableContexts()
174 if (!$screen_context_stack->
hasMatch($collection)) {
175 $screen_context_stack = $screen_context_stack->
repository();
177 return $screen_context_stack;
182 $image_factory = $this->dic->ui()->factory()->image();
184 if (!$this->fetch_tile_image) {
190 if ($tile_image !==
null && $tile_image->getRid() !==
null) {
191 $uri_string = $tile_image->getImage($image_factory)->getAdditionalHighResSources()[
'960']
192 ?? $tile_image->getImage($image_factory)->getSource();
194 $image = $this->data->openGraphMetadata()->image(
195 $this->data->uri($uri_string),
LOMServices $lom_services
getPresentationImage(\ilObject $object)
exposeDefaultOpenGraphMetaData()
Interface Observer Contains several chained tasks and infos about them.
getLanguageCodesFromLOM(int $object_id, string $object_type)
Class ContentModification.
Customizing of pimple-DIC for ILIAS.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
Class AbstractModificationProvider.
__construct(\ILIAS\DI\Container $dic)
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
ensureRepoContext(CalledContexts $screen_context_stack)
getObjectOfContext(ScreenContext $context)
hasMatch(ContextCollection $other_collection)
__construct(Container $dic, ilPlugin $plugin)
getLongDescription()
get object long description (stored in object_description)
exposeObjectOpenGraphMetaData(\ilObject $object)
getContentModification(CalledContexts $screen_context_stack)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getPresentationTitle()
get presentation title Normally same as title Overwritten for sessions