79 $txt =
function ($id) :
string {
80 return $this->lng->txt($id);
83 return $this->ui_fa->input();
86 $title =
$f()->field()->text(
$txt(
'sub_title_default'),
$txt(
'sub_title_default_byline'));
87 if (!$this->item_facade->isEmpty()) {
88 $title = $title->withValue($this->item_facade->getDefaultTitle());
90 $items[self::F_TITLE] = $title;
93 if (($this->item_facade->isEmpty() || $this->item_facade->isCustom())) {
95 $type =
$f()->field()->switchableGroup($type_groups,
$txt(
'sub_type'),
$txt(
'sub_type_byline'))->withRequired(
true);
96 if (!$this->item_facade->isEmpty()) {
97 $string = $this->item_facade->getType() ===
'' ? Link::class : $this->item_facade->getType();
102 $items[self::F_TYPE] =
$type;
106 if ($this->item_facade->supportsCustomIcon()) {
109 ->withByline(
$txt(
'sub_icon_byline'))
111 if ($this->item_facade->getIconID() !== null) {
112 $icon = $icon->withValue([$this->item_facade->getIconID()]);
115 $items[self::F_ICON] = $icon;
119 $parent =
$f()->field()->select(
$txt(
'sub_parent'), $this->
repository->getPossibleParentsForFormAndTable())
120 ->withRequired(
true);
121 if (!$this->item_facade->isEmpty() && !$this->item_facade->isInLostItem()) {
122 $parent = $parent->withValue($this->item_facade->getParentIdentificationString());
124 $array = array_keys($this->
repository->getPossibleParentsForFormAndTable());
125 $parent = $parent->withValue(reset($array));
127 $items[self::F_PARENT] = $parent;
130 $active =
$f()->field()->checkbox(
$txt(
'sub_active'),
$txt(
'sub_active_byline'));
131 $active = $active->withValue($this->item_facade->isActivated());
132 $items[self::F_ACTIVE] = $active;
135 if ($this->item_facade->isEmpty()) {
137 $this->form =
$f()->container()->form()
141 $this->form =
$f()->container()->form()
Class ilMMUploadHandlerGUI.