3 declare(strict_types=1);
27 $this->access = $access;
32 return $this->
object->getTitle();
37 return $this->
object->getType();
71 throw new LogicException(
"The Legacy Mode in the Learning Sequence requires an LSControlBuilder explicitely.", 1);
76 $ref_id = $this->
object->getRefId();
77 $obj_id = (int) $this->object->getId();
78 $type = $this->
object->getType();
87 if (in_array(
$type, self::GET_VIEW_CMD_FROM_LIST_GUI_FOR)) {
89 $item_list_gui->initItem($ref_id, $obj_id);
90 $view_link = $item_list_gui->getCommandLink(
'view');
91 $view_link = str_replace(
'&',
'&', $view_link);
92 $view_link = ILIAS_HTTP_PATH .
'/' . $view_link;
96 $builder->start($label,
$url, $obj_id);
126 $obj_type = $this->
object->getType();
127 $obj_type_txt = $this->lng->txt(
'obj_' . $obj_type);
128 $icon = $factory->
icon()->standard($obj_type, $obj_type_txt,
'large');
129 $md = $this->
getMetadata((
int) $this->object->getId(), $obj_type);
130 $props = array_merge(
131 [$this->lng->txt(
'obj_type') => $obj_type_txt],
132 $this->
getMetadata((
int) $this->object->getId(), $obj_type)
135 $info = $factory->
item()->standard($this->object->getTitle())
136 ->withLeadIcon($icon)
137 ->withDescription($this->object->getDescription())
138 ->withProperties($props);
146 $md =
new ilMD($obj_id, 0, $type);
154 $meta_data[
'language'] = [];
156 $meta_data[
'language'][] =
$section->getLanguage(
$id)->getLanguageCode();
158 $meta_data[
'keywords'] = [];
160 $meta_data[
'keywords'][] =
$section->getKeyword(
$id)->getKeyword();
164 foreach ($meta_data as $md_label =>
$values) {
166 $md_flat[$this->lng->txt($md_label)] = implode(
', ',
$values);
179 ->item(
'item1.2', 11)
182 ->node(
'node3', 1111)
185 ->item(
'item3.2.1', 122)
190 ->locator(
'locator_cmd')
200 ->generic(
'cmd 1',
'x', 1)
201 ->generic(
'cmd 2',
'x', 2)
203 ->mode(
'modecmd', [
'm1',
'm2',
'm3'])
211 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.
if(!array_key_exists('StateId', $_REQUEST)) $id
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.
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
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)
icon()
description: purpose: > Icons are quickly comprehensible and recognizable graphics.