3declare(strict_types=1);
52 protected Psr\Http\Message\ServerRequestInterface
$request;
70 Psr\Http\Message\ServerRequestInterface
$request,
79 $this->
ctrl = $ilCtrl;
103 $next_class = $this->
ctrl->getNextClass();
104 switch ($next_class) {
105 case 'ilstudyprogrammecommonsettingsgui':
106 $this->
tabs->activateSubTab(self::TAB_COMMON_SETTINGS);
107 $this->common_settings_gui->setObject($this->
getObject());
108 $content = $this->
ctrl->forwardCommand($this->common_settings_gui);
111 $cmd = $this->
ctrl->getCmd();
112 if ($cmd ===
"" || $cmd ===
null) {
117 $content = $this->
view();
120 $content = $this->$cmd();
124 "ilObjStudyProgrammeSettingsGUI: Command not supported: $cmd"
129 if (!$this->
ctrl->isAsynch()) {
130 $this->tpl->setContent($content);
133 $heading = $this->tmp_heading ?? $this->
lng->txt(
"prg_async_" . $this->
ctrl->getCmd());
134 $output_handler->setHeading($heading);
135 $output_handler->setContent($content);
136 $output_handler->terminate();
140 protected function view(): string
143 $this->
lng->txt(
'prg_async_settings'),
144 $this->request_wrapper->has(
"currentNode")
148 return $this->renderer->render($form);
157 ->buildForm($this->
getObject(), $this->
ctrl->getFormAction($this,
"update"))
158 ->withRequest($this->request);
160 $result = $form->getInputGroup()->getContent();
165 if ($result->isOK()) {
166 $result->value()->update();
167 $this->tpl->setOnScreenMessage(
"success", $this->
lng->txt(
"msg_obj_modified"),
true);
169 if ($this->
ctrl->isAsynch()) {
173 "message" => $this->
lng->txt(
"msg_obj_modified"))
178 $this->
ctrl->redirect($this);
180 $this->tpl->setOnScreenMessage(
"failure", $this->
lng->txt(
"msg_form_save_error"));
182 if ($this->
ctrl->isAsynch()) {
186 "errors" => $form->getError())
191 return $this->renderer->render($form);
197 if (!$current_node) {
198 $this->
ctrl->saveParameterByClass(
'ilobjstudyprogrammesettingsgui',
'ref_id');
200 $heading_button->setCaption(
'prg_open_node');
201 $heading_button->setUrl(
202 $this->
ctrl->getLinkTargetByClass(
203 'ilobjstudyprogrammetreegui',
211 "<div class='pull-right'>" .
212 $heading_button->render() .
215 $this->tmp_heading = $heading;
217 $this->tmp_heading =
"<div class=''>" . $label .
"</div>";
223 string $submit_action
225 $trans = $prg->getObjectTranslation();
226 $ff = $this->input_factory->field();
227 $sp_types = $this->type_repository->getAllTypesArray();
230 return $this->input_factory->container()->form()->standard(
238 )->withAdditionalTransformation(
239 $this->refinery_factory->custom()->transformation(
241 $object_data = $values[0];
242 $prg->
setTitle($object_data[self::PROP_TITLE]);
246 ->withAssessmentSettings($values[
'prg_assessment'])
247 ->withDeadlineSettings($values[
'prg_deadline'])
248 ->withValidityOfQualificationSettings($values[
'prg_validity_of_qualification'])
249 ->withAutoMailSettings($values[
'automail_settings'])
250 ->withTypeSettings($values[
'prg_type']);
261 InputFieldFactory $ff,
267 $this->getEditSection($ff, $trans),
270 ->toFormInput($ff, $this->
lng, $this->refinery_factory, $sp_types)
273 ->getAssessmentSettings()
274 ->toFormInput($ff, $this->
lng, $this->refinery_factory)
277 ->getDeadlineSettings()
278 ->toFormInput($ff, $this->
lng, $this->refinery_factory, $this->data_factory)
280 "prg_validity_of_qualification" =>
$settings
281 ->getValidityOfQualificationSettings()
282 ->toFormInput($ff, $this->
lng, $this->refinery_factory, $this->data_factory)
285 ->getAutoMailSettings()
286 ->toFormInput($ff, $this->
lng, $this->refinery_factory)
293 InputFieldFactory $ff,
301 $ff->text($this->txt(
"title"))
303 ->withRequired(
true),
305 $ff->textarea($this->txt(
"description"))
308 $this->txt(
"prg_edit"),
309 $this->txt(
"language") .
": " .
$lang .
310 ' <a href="' . $this->ctrl->getLinkTargetByClass(
"ilobjecttranslationgui",
"") .
311 '">» ' . $this->txt(
"obj_more_translations") .
'</a>'
317 if ($this->
object ===
null) {
320 return $this->object;
323 protected function txt(
string $code): string
325 return $this->
lng->txt($code);
static return function(ContainerConfigurator $containerConfigurator)
Class ilAsyncOutputHandler Handles the output for async-requests.
static handleAsyncOutput(string $normal_content, string $async_content=null, bool $apply_to_tpl=true)
Handles async output.
static encodeAsyncResponse(array $data=array())
Encode data as json for async output.
Class ilCtrl provides processing control methods.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
loadLanguageModule(string $a_module)
Load language module.
@ilCtrl_Calls ilObjStudyProgrammeSettingsGUI: ilStudyProgrammeCommonSettingsGUI
ILIAS HTTP Wrapper RequestWrapper $request_wrapper
ilObjStudyProgramme $object
ilStudyProgrammeCommonSettingsGUI $common_settings_gui
const OPT_NO_VALIDITY_OF_QUALIFICATION
const PROP_VALIDITY_OF_QUALIFICATION
ILIAS UI Component Input Factory $input_factory
const OPT_VALIDITY_OF_QUALIFICATION_DATE
buildFormElements(InputFieldFactory $ff, ilObjectTranslation $trans, array $sp_types, ilStudyProgrammeSettings $settings)
getEditSection(InputFieldFactory $ff, ilObjectTranslation $trans)
const OPT_DEADLINE_PERIOD
buildForm(ilObjStudyProgramme $prg, string $submit_action)
const TAB_COMMON_SETTINGS
ILIAS Data Factory $data_factory
ILIAS Refinery Factory $refinery_factory
ilStudyProgrammeTypeRepository $type_repository
const OPT_VALIDITY_OF_QUALIFICATION_PERIOD
__construct(ilGlobalTemplateInterface $tpl, ilCtrl $ilCtrl, ilLanguage $lng, Factory $input_factory, Renderer $renderer, Psr\Http\Message\ServerRequestInterface $request, ILIAS\Refinery\Factory $refinery_factory, ILIAS\Data\Factory $data_factory, ilStudyProgrammeTypeRepository $type_repository, ilStudyProgrammeCommonSettingsGUI $common_settings_gui, ilTabsGUI $tabs, ILIAS\HTTP\Wrapper\RequestWrapper $request_wrapper)
ILIAS UI Renderer $renderer
Psr Http Message ServerRequestInterface $request
buildModalHeading(string $label, bool $current_node)
ilGlobalTemplateInterface $tpl
updateSettings(ilStudyProgrammeSettings $settings)
static getInstanceByRefId($ref_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
setDescription(string $desc)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface RequestWrapper.
An entity that renders components to a string output.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ChatMainBarProvider \MainMenu\Provider.