156 $DIC->help()->setScreenId(
'dcl_record');
157 $ilTabs = $DIC->tabs();
158 $tpl = $DIC->ui()->mainTemplate();
159 $ilCtrl = $DIC->ctrl();
163 $ilTabs->setTabActive(
"id_content");
165 if (!$this->tableview_id) {
166 $ilCtrl->redirectByClass(ilDclRecordListGUI::class,
"listRecords");
171 $pageObj->setOutputMode($pageObj::PRESENTATION);
173 $html = $pageObj->showPage();
174 $rctpl->addCss(
"./assets/css/content.css");
175 $rctpl->fillCssFiles();
179 $pattern =
'/\[dcliln field="' . preg_quote($field->getTitle(),
"/") .
'"\](.*?)\[\/dcliln\]/';
180 if (preg_match($pattern, $html)) {
181 $html = preg_replace(
183 $this->record_obj->getRecordFieldSingleHTML($field->getId(), $this->
setOptions(
"$1")),
189 $pattern =
'/\[dclrefln field="' . preg_quote($field->getTitle(),
"/") .
'"\](.*?)\[\/dclrefln\]/';
190 if (preg_match($pattern, $html)) {
191 $this->currentField = $field;
192 $html = preg_replace_callback($pattern, [$this,
"doReplace"], $html);
195 $pattern =
'/\[ext tableOf="' . preg_quote($field->getTitle(),
"/") .
'" field="(.*?)"\]/';
196 if (preg_match($pattern, $html)) {
197 $this->currentField = $field;
198 $html = preg_replace_callback($pattern, [$this,
"doExtReplace"], $html);
201 $html = str_ireplace(
202 "[" . $field->getTitle() .
"]",
203 $this->record_obj->getRecordFieldSingleHTML($field->getId(), [
'tableview_id' =>
$this->tableview_id]),
207 foreach (
$table->getStandardFields() as $field) {
208 $html = str_ireplace(
209 "[" . $field->getId() .
"]",
210 $this->record_obj->getRecordFieldSingleHTML($field->getId(), [
'tableview_id' =>
$this->tableview_id]),
214 $rctpl->setVariable(
"CONTENT", $html);
217 $tpl->setPermanentLink(
219 filter_input(INPUT_GET,
'ref_id', FILTER_VALIDATE_INT),
220 $this->table->getId() .
'_' . $this->tableview_id .
'_' . $this->record_obj->getId()
225 if ($this->is_enabled_paging) {
227 if ($record_ids !== [] && array_search($this->record_id, $record_ids) !==
false) {
228 $DIC->toolbar()->addComponent(
229 $DIC->ui()->factory()->viewControl()->pagination()
230 ->withTargetURL($this->
ctrl->getLinkTargetByClass(self::class,
'jumpToRecord'),
'record_pos')
233 ->withDropdownLabel($this->
lng->txt(
'entry_of'))
234 ->withCurrentPage(array_search($this->record_id, $record_ids))
235 ->withTotalEntries(count($record_ids))
236 ->withMaxPaginationButtons(20)
241 if ($this->record_obj->hasPermissionToEdit($this->dcl_gui_object->getRefId())) {
242 $DIC->toolbar()->addSpacer(
'100%');
243 $this->
ctrl->setParameterByClass(ilDclRecordEditGUI::class,
'table_id', $this->table->getId());
244 $this->
ctrl->setParameterByClass(ilDclRecordEditGUI::class,
'tableview_id', $this->tableview_id);
246 $this->
ctrl->saveParameterByClass(ilDclRecordEditGUI::class,
'record_id');
247 $DIC->toolbar()->addComponent($DIC->ui()->factory()->button()->standard(
248 $this->
lng->txt(
'dcl_edit_record'),
249 $this->
ctrl->getLinkTargetByClass(ilDclRecordEditGUI::class,
'edit')
254 if ($this->table->getPublicCommentsEnabled()) {
255 $rctpl->setVariable(
'COMMENTS', $this->
renderComments($editComments));
258 $tpl->setContent($rctpl->get());
static get(string $a_var)
setOptions(string $link_name)
ilDclDetailedViewDefinitionGUI: ilPageEditorGUI, ilEditClipboardGUI, ilMediaPoolTargetSelector ilDcl...
renderComments(bool $edit=false)
static getTableCache(int $table_id=null)
getRecordFields()
Returns all fields of this table which are NOT standard fields.