19declare(strict_types=1);
35 protected Metadata
$md;
39 $this->md =
$dic->learningObjectMetadata();
45 return $this->context_collection->
repository();
50 if ($screen_context_stack->
current()->hasReferenceId()) {
51 $object_id = $screen_context_stack->
current()->getReferenceId()->toObjectId()->toInt();
52 $paths = $this->md->paths();
57 foreach ($reader->allData($paths->keywords()) as $keyword) {
58 $keywords[] = $keyword->value();
60 if (count($keywords) > 0) {
62 $this->data->htmlMetadata()->userDefined(
'keywords', implode(
',', $keywords))
68 foreach ($reader->allData($paths->languages()) as $language) {
69 $languages[] = $language->value();
71 if (count($languages) > 0) {
73 $this->data->htmlMetadata()->userDefined(
'languages', implode(
',', $languages))
78 if ($this->md->copyrightHelper()->isCopyrightSelectionActive()) {
80 if ($this->md->copyrightHelper()->hasPresetCopyright($reader)) {
81 $copyright = $this->md->copyrightHelper()->readPresetCopyright($reader)->presentAsString();
83 $copyright = $this->md->copyrightHelper()->readCustomCopyright($reader);
86 $this->data->htmlMetadata()->userDefined(
'copyright', $copyright)
96 $path = $this->md->paths()->custom()->withNextStep(
'general')->get();
97 return $this->md->read(
107 $path = $this->md->paths()->custom()
108 ->withNextStep(
'rights')
109 ->withNextStep(
'description')
110 ->withNextStep(
'string')
112 return $this->md->read(
Class ContentModification.
Class AbstractModificationProvider.
Class ilMDKeywordExposer.
getContentModification(CalledContexts $screen_context_stack)
@inheritDoc
__construct(\ILIAS\DI\Container $dic)
copyrightReader(int $object_id)
generalReader(int $object_id)
static _lookupType(int $id, bool $reference=false)
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.