3 declare(strict_types=1);
52 $this->window_properties = $windows_properties;
62 if (
$type === self::OUTPUT_MODAL) {
63 $tpl =
new ilTemplate(
'tpl.modal_content.html',
false,
false,
'Modules/StudyProgramme');
80 if (
$type === self::OUTPUT_EMPTY) {
92 $ilCtrl = $DIC[
'ilCtrl'];
94 $data[
'cmd'] = $ilCtrl->getCmd();
96 return json_encode(
$data, JSON_THROW_ON_ERROR);
105 string $normal_content,
106 string $async_content = null,
107 bool $apply_to_tpl =
true 110 $ilCtrl = $DIC[
'ilCtrl'];
112 $http = $DIC[
'http'];
114 $content = ($ilCtrl->isAsynch() && $async_content !== null) ? $async_content : $normal_content;
116 if ($ilCtrl->isAsynch()) {
119 ->withHeader(ResponseHeader::CONTENT_TYPE,
'text/html')
120 ->withBody(Streams::ofString(
$content))
122 $http->sendResponse();
125 } elseif ($apply_to_tpl) {
getWindowProperties()
Return all window properties.
Class ilAsyncOutputHandler Handles the output for async-requests.
getHeading()
Return the heading of a modal.
static handleAsyncOutput(string $normal_content, string $async_content=null, bool $apply_to_tpl=true)
Handles async output.
__construct($content=null, $heading=null, array $windows_properties=array())
setWindowProperties(array $window_properties)
Set windows properties.
static encodeAsyncResponse(array $data=array())
Encode data as json for async output.
setContent($content)
Sets the content of the modal output.
getContent()
Returns the content of the modal output.
terminate(string $type=self::OUTPUT_MODAL)
Output content in different ways self::OUTPUT_MODAL: Output as bootstrap modal self::OUTPUT_EMPTY: On...
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
setHeading($heading)
Sets the heading of a modal-output.