19 declare(strict_types=1);
51 return $this->
object->getTitle();
78 throw new LogicException(
"The Legacy Mode in the Learning Sequence requires an LSControlBuilder explicitely.", 1);
81 $ref_id = $this->
object->getRefId();
82 $type = $this->
object->getType();
85 $this->
lng->txt(
'lso_start_item'),
94 $obj_id = $this->
object->getId();
95 if (in_array($type, self::GET_VIEW_CMD_FROM_LIST_GUI_FOR)) {
97 $item_list_gui->initItem(
$ref_id, $obj_id, $type);
98 $view_link = $item_list_gui->getCommandLink(
'view');
99 $view_link = str_replace(
'&',
'&', $view_link);
100 $view_link = ILIAS_HTTP_PATH .
'/' . $view_link;
104 $builder->start($label, $url, $obj_id);
134 $obj_type = $this->
object->getType();
135 $obj_type_txt = $this->
lng->txt(
'obj_' . $obj_type);
136 $icon = $factory->
symbol()->icon()->standard($obj_type, $obj_type_txt,
'large');
138 $props = array_merge(
139 [$this->
lng->txt(
'obj_type') => $obj_type_txt],
143 return $factory->
panel()->standard(
144 $this->
object->getTitle(),
146 $factory->
messageBox()->info($this->
lng->txt(
'lso_legacy_info')),
147 $factory->
item()->standard($this->
object->getTitle())
148 ->withLeadIcon($icon)
149 ->withDescription($this->
object->getDescription())
150 ->withProperties($props)
161 $paths = $this->lom_services->paths();
162 $data_helper = $this->lom_services->dataHelper();
163 $reader = $this->lom_services->read(
167 $paths->custom()->withNextStep(
'general')->get()
172 $languages = $data_helper->makePresentableAsList(
174 ...$reader->allData($paths->languages())
176 if ($languages !==
'') {
177 $meta_data[$this->
lng->txt(
'language')] = $languages;
180 $keywords = $data_helper->makePresentableAsList(
182 ...$reader->allData($paths->keywords())
184 if ($keywords !==
'') {
185 $meta_data[$this->
lng->txt(
'keywords')] = $keywords;
193 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)
Keeps the state of a view in a simple stringly type key-value store.
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
render(State $state, Factory $factory, URLBuilder $url_builder, ?array $post=null)
const GET_VIEW_CMD_FROM_LIST_GUI_FOR
buildControls(State $state, ControlBuilder $builder)
This is how the factory for UI elements looks.
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)
updateGet(State $state, string $command, ?int $parameter=null)
item()
description: purpose: > An item displays a unique entity within the system.
__construct(ilObject $object, ilLanguage $lng, ilAccess $access, LOMServices $lom_services)
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.
LOMServices $lom_services
getMetadata(int $obj_id, string $type)
Build controls for the view.
hasPermissionToAccessKioskMode()
getTitleByType(string $type)