19 declare(strict_types=1);
47 return $this->
object->getTitle();
74 throw new LogicException(
"The Legacy Mode in the Learning Sequence requires an LSControlBuilder explicitely.", 1);
77 $ref_id = $this->
object->getRefId();
78 $type = $this->
object->getType();
81 $this->
lng->txt(
'lso_start_item'),
90 $obj_id = $this->
object->getId();
91 if (in_array($type, self::GET_VIEW_CMD_FROM_LIST_GUI_FOR)) {
93 $item_list_gui->initItem(
$ref_id, $obj_id, $type);
94 $view_link = $item_list_gui->getCommandLink(
'view');
95 $view_link = str_replace(
'&',
'&', $view_link);
96 $view_link = ILIAS_HTTP_PATH .
'/' . $view_link;
100 $builder->start($label, $url, $obj_id);
130 $obj_type = $this->
object->getType();
131 $obj_type_txt = $this->
lng->txt(
'obj_' . $obj_type);
132 $icon = $factory->
symbol()->icon()->standard($obj_type, $obj_type_txt,
'large');
134 $props = array_merge(
135 [$this->
lng->txt(
'obj_type') => $obj_type_txt],
139 return $factory->
panel()->standard(
140 $this->
object->getTitle(),
142 $factory->
messageBox()->info($this->
lng->txt(
'lso_legacy_info')),
143 $factory->
item()->standard($this->
object->getTitle())
144 ->withLeadIcon($icon)
145 ->withDescription($this->
object->getDescription())
146 ->withProperties($props)
157 $md =
new ilMD($obj_id, 0, $type);
160 $section = $md->getGeneral();
165 $meta_data[
'language'] = [];
166 foreach ($section->getLanguageIds() as
$id) {
167 $meta_data[
'language'][] = $section->getLanguage(
$id)->getLanguageCode();
169 $meta_data[
'keywords'] = [];
170 foreach ($section->getKeywordIds() as
$id) {
171 $meta_data[
'keywords'][] = $section->getKeyword(
$id)->getKeyword();
175 foreach ($meta_data as $md_label => $values) {
176 if ($values !== []) {
177 $md_flat[$this->
lng->txt($md_label)] = implode(
', ', $values);
185 return $this->
lng->txt(
"obj_" . $type);
panel()
description: purpose: > Panels are used to group titled content.
symbol()
description: purpose: > Symbols are graphical representations of concepts or contexts quickly compre...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
updatePost(State $state, string $command, array $post)
__construct(ilObject $object, ilLanguage $lng, ilAccess $access)
Keeps the state of a view in a simple stringly type key-value store.
const GET_VIEW_CMD_FROM_LIST_GUI_FOR
buildControls(State $state, ControlBuilder $builder)
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
setObject(\ilObject $object)
static _getListGUIByType(string $type, int $context=ilObjectListGUI::CONTEXT_REPOSITORY)
render(State $state, Factory $factory, URLBuilder $url_builder, array $post=null)
item()
description: purpose: > An item displays a unique entity within the system.
messageBox()
description: purpose: > Message Boxes inform the user about the state of the system or an ongoing us...
buildInitialState(State $empty_state)
The URLBuilder allows views to get links that are used somewhere inline in the content.
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
getMetadata(int $obj_id, string $type)
Build controls for the view.
hasPermissionToAccessKioskMode()
updateGet(State $state, string $command, int $parameter=null)
getTitleByType(string $type)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...