19declare(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'),
86 $this->getTitleByType($type)
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],
140 $this->getMetadata($this->object->getId(), $obj_type)
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);
Builds a Color from either hex- or rgb values.
Keeps the state of a view in a simple stringly type key-value store.
Class ilAccessHandler Checks access for ILIAS objects.
LOMServices $lom_services
const GET_VIEW_CMD_FROM_LIST_GUI_FOR
buildInitialState(State $empty_state)
@inheritDoc
updateGet(State $state, string $command, ?int $parameter=null)
@inheritDoc
__construct(ilObject $object, ilLanguage $lng, ilAccess $access, LOMServices $lom_services)
updatePost(State $state, string $command, array $post)
@inheritDoc
buildControls(State $state, ControlBuilder $builder)
@inheritDoc
setObject(\ilObject $object)
getTitleByType(string $type)
hasPermissionToAccessKioskMode()
render(State $state, Factory $factory, URLBuilder $url_builder, ?array $post=null)
@inheritDoc
getMetadata(int $obj_id, string $type)
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
static _getListGUIByType(string $type, int $context=ilObjectListGUI::CONTEXT_REPOSITORY)
Class ilObject Basic functions for all objects.
Build controls for the view.
The URLBuilder allows views to get links that are used somewhere inline in the content.
A kiosk mode view on a certain object.
A component is the most general form of an entity in the UI.
This is how the factory for UI elements looks.