3declare(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'),
82 $this->getTitleByType(
$type)
90 $obj_id = $this->
object->getId();
91 if (in_array(
$type, self::GET_VIEW_CMD_FROM_LIST_GUI_FOR)) {
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],
136 $this->getMetadata($this->object->getId(), $obj_type)
140 ->withLeadIcon($icon)
141 ->withDescription($this->
object->getDescription())
142 ->withProperties($props);
154 $section = $md->getGeneral();
159 $meta_data[
'language'] = [];
160 foreach ($section->getLanguageIds() as
$id) {
161 $meta_data[
'language'][] = $section->getLanguage(
$id)->getLanguageCode();
163 $meta_data[
'keywords'] = [];
164 foreach ($section->getKeywordIds() as
$id) {
165 $meta_data[
'keywords'][] = $section->getKeyword(
$id)->getKeyword();
169 foreach ($meta_data as $md_label => $values) {
170 if ($values !== []) {
171 $md_flat[$this->
lng->txt($md_label)] = implode(
', ', $values);
179 return $this->
lng->txt(
"obj_" . $type);
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Keeps the state of a view in a simple stringly type key-value store.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
__construct(ilObject $object, ilLanguage $lng, ilAccess $access)
const GET_VIEW_CMD_FROM_LIST_GUI_FOR
buildInitialState(State $empty_state)
@inheritDoc
render(State $state, Factory $factory, URLBuilder $url_builder, array $post=null)
@inheritDoc
updatePost(State $state, string $command, array $post)
@inheritDoc
buildControls(State $state, ControlBuilder $builder)
@inheritDoc
setObject(\ilObject $object)
getTitleByType(string $type)
hasPermissionToAccessKioskMode()
updateGet(State $state, string $command, int $parameter=null)
@inheritDoc
getMetadata(int $obj_id, string $type)
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
Get static link.
static _getListGUIByType(string $type, int $context=ilObjectListGUI::CONTEXT_REPOSITORY)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...