3 declare(strict_types=1);
27 $this->access = $access;
32 return $this->
object->getTitle();
66 throw new LogicException(
"The Legacy Mode in the Learning Sequence requires an LSControlBuilder explicitely.", 1);
69 $ref_id = $this->
object->getRefId();
70 $type = $this->
object->getType();
73 $this->lng->txt(
'lso_start_item'),
84 if (in_array(
$type, self::GET_VIEW_CMD_FROM_LIST_GUI_FOR)) {
85 $obj_id = $this->
object->getId();
87 $item_list_gui->initItem($ref_id, $obj_id,
$type);
88 $view_link = $item_list_gui->getCommandLink(
'view');
89 $view_link = str_replace(
'&',
'&', $view_link);
94 $builder->start($label, $url, 0);
125 $obj_type = $this->
object->getType();
126 $obj_type_txt = $this->lng->txt(
'obj_' . $obj_type);
127 $icon = $factory->
symbol()->icon()->standard($obj_type, $obj_type_txt,
'large');
128 $md = $this->
getMetadata((
int) $this->object->getId(), $obj_type);
129 $props = array_merge(
130 [$this->lng->txt(
'obj_type') => $obj_type_txt],
131 $this->
getMetadata((
int) $this->object->getId(), $obj_type)
134 $info = $factory->
item()->standard($this->object->getTitle())
135 ->withLeadIcon($icon)
136 ->withDescription($this->object->getDescription())
137 ->withProperties($props);
145 $md =
new ilMD($obj_id, 0, $type);
153 $meta_data[
'language'] = [];
154 foreach (
$section->getLanguageIds() as $id) {
155 $meta_data[
'language'][] =
$section->getLanguage($id)->getLanguageCode();
157 $meta_data[
'keywords'] = [];
158 foreach (
$section->getKeywordIds() as $id) {
159 $meta_data[
'keywords'][] =
$section->getKeyword($id)->getKeyword();
163 foreach ($meta_data as $md_label => $values) {
164 if (count($values) > 0) {
165 $md_flat[$this->lng->txt($md_label)] = implode(
', ', $values);
178 ->item(
'item1.2', 11)
181 ->node(
'node3', 1111)
184 ->item(
'item3.2.1', 122)
189 ->locator(
'locator_cmd')
199 ->generic(
'cmd 1',
'x', 1)
200 ->generic(
'cmd 2',
'x', 2)
202 ->mode(
'modecmd', [
'm1',
'm2',
'm3'])
210 return $this->lng->txt(
"obj_" . $type);
Class ilLegacyKioskModeView.
updateGet(State $state, string $command, int $param=null)
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
symbol()
description: purpose: > Symbols are graphical representations of concepts or contexts quickly compre...
tableOfContent(string $label, string $command, int $parameter=null, $state=null)
A table of content allows the user to get an overview over the generally available content in the obj...
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.
A kiosk mode view on a certain object.
const GET_VIEW_CMD_FROM_LIST_GUI_FOR
buildControls(State $state, ControlBuilder $builder)
This is how the factory for UI elements looks.
debugBuildAllControls(ControlBuilder $builder)
setObject(\ilObject $object)
render(State $state, Factory $factory, URLBuilder $url_builder, array $post=null)
item()
description: purpose: > An item displays a unique entity within the system.
buildInitialState(State $empty_state)
The URLBuilder allows views to get links that are used somewhere inline in the content.
static _getListGUIByType($a_type, $a_context=ilObjectListGUI::CONTEXT_REPOSITORY)
getMetadata(int $obj_id, string $type)
Build controls for the view.
hasPermissionToAccessKioskMode()
getTitleByType(string $type)