166 : void
167 {
169 $ilTabs =
$DIC->tabs();
171 $ilCtrl =
$DIC->ctrl();
172
174
175 $ilTabs->setTabActive("id_content");
176
177 if (!$this->tableview_id) {
178 $ilCtrl->redirectByClass("ildclrecordlistgui", "listRecords");
179 }
180
181
183 $pageObj->setStyleId(
184 $this->content_style_domain->getEffectiveStyleId()
185 );
186
187 $html = $pageObj->getHTML();
188 $rctpl->addCss("./Services/COPage/css/content.css");
189 $rctpl->fillCssFiles();
192
193 $pattern = '/\[dcliln field="' . preg_quote($field->getTitle(), "/") . '"\](.*?)\[\/dcliln\]/';
194 if (preg_match($pattern, $html)) {
195 $html = preg_replace(
196 $pattern,
197 $this->record_obj->getRecordFieldSingleHTML($field->getId(), $this->setOptions("$1")),
198 $html
199 );
200 }
201
202
203 $pattern = '/\[dclrefln field="' . preg_quote($field->getTitle(), "/") . '"\](.*?)\[\/dclrefln\]/';
204 if (preg_match($pattern, $html)) {
205 $this->currentField = $field;
206 $html = preg_replace_callback($pattern, [$this, "doReplace"], $html);
207 }
208
209 $pattern = '/\[ext tableOf="' . preg_quote($field->getTitle(), "/") . '" field="(.*?)"\]/';
210 if (preg_match($pattern, $html)) {
211 $this->currentField = $field;
212 $html = preg_replace_callback($pattern, [$this, "doExtReplace"], $html);
213 }
214
215 $html = str_ireplace(
216 "[" . $field->getTitle() . "]",
217 $this->record_obj->getRecordFieldSingleHTML($field->getId(), ['tableview_id' => $this->tableview_id]),
218 $html
219 );
220 }
221 foreach (
$table->getStandardFields() as $field) {
222 $html = str_ireplace(
223 "[" . $field->getId() . "]",
224 $this->record_obj->getRecordFieldSingleHTML($field->getId(), ['tableview_id' => $this->tableview_id]),
225 $html
226 );
227 }
228 $rctpl->setVariable("CONTENT", $html);
229
230
231 $tpl->setPermanentLink(
232 'dcl',
233 filter_input(INPUT_GET, 'ref_id', FILTER_VALIDATE_INT),
234 '_' . $this->tableview_id . '_' . $this->record_obj->getId()
235 );
236
237
238
239 if ($this->is_enabled_paging) {
241 $rctpl->setVariable('PREV_NEXT_RECORD_LINKS', $prevNextLinks);
242 $ilCtrl->clearParameters($this);
243 $rctpl->setVariable('FORM_ACTION', $ilCtrl->getFormAction($this));
244 $rctpl->setVariable(
'RECORD', $this->
lng->txt(
'dcl_record'));
245 $rctpl->setVariable(
246 'RECORD_FROM_TOTAL',
247 sprintf(
248 $this->
lng->txt(
'dcl_record_from_total'),
249 $this->current_record_position,
250 count($this->record_ids)
251 )
252 );
253 $rctpl->setVariable('TABLEVIEW_ID', $this->tableview_id);
255 }
256
257
258 $ref_id = $this->
http->wrapper()->query()->retrieve(
'ref_id', $this->
refinery->kindlyTo()->int());
259
260 if ($this->record_obj->hasPermissionToEdit(
$ref_id)) {
262 $ilCtrl->setParameterByClass('ildclrecordeditgui', 'table_id', $this->table->getId());
263 $ilCtrl->setParameterByClass('ildclrecordeditgui', 'tableview_id', $this->tableview_id);
265 $ilCtrl->saveParameterByClass('ildclrecordeditgui', 'record_id');
266 $button->setUrl($ilCtrl->getLinkTargetByClass('ildclrecordeditgui', 'edit'));
267 $button->setCaption($this->
lng->txt(
'dcl_edit_record'),
false);
268 $rctpl->setVariable('EDIT_RECORD_BUTTON', $button->render());
269 }
270
271
272 if ($this->table->getPublicCommentsEnabled()) {
273 $rctpl->setVariable(
'COMMENTS', $this->
renderComments($editComments));
274 }
275
276 $tpl->setContent($rctpl->get());
277 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getTableCache(int $table_id=null)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
renderPrevNextLinks()
Determine and return the markup for the previous/next records.
renderSelectOptions()
Render select options.
renderComments(bool $edit=false)
getRecordFields()
Returns all fields of this table which are NOT standard fields.