62 $attributes = $this->facade->entryFactory()->loadParsedAttributesByEntryId($this->
getEntry()->getId());
65 $overviewModels = $this->facade->overviewModelFactory()->getAllOverviewModelsByType($this->facade->type());
67 $entryType = $this->
getEntry()->getType();
69 if (!$overviewModels[$this->facade->typeFactory()->getDataTypeIdentifierByInstance($this->facade->entryFactory()->getFileType())][$entryType]) {
70 $entryType =
'default';
72 $single_entry = $overviewModels[$entryType];
75 preg_match_all(
'/\[(.*?)\]/', $single_entry, $placeholders);
76 foreach ($placeholders[1] as $key => $placeholder) {
78 $cuts = explode(
'|', $placeholder);
81 $attribute_elements = explode(
'_', $cuts[1]);
82 $attribute_elements[1] = strtolower($this->
getEntry()->getType());
83 $cuts[1] = implode(
'_', $attribute_elements);
87 $single_entry = str_replace($placeholders[0][$key], $cuts[0] .
$attributes[$cuts[1]]
88 . $cuts[2], $single_entry);
91 $first_sign_after_begin_emph_tag = strpos(strtolower($single_entry),
'<emph>')
93 $last_sign_after_end_emph_tag = strpos(strtolower($single_entry),
'</emph>');
94 $italic_text_length = $last_sign_after_end_emph_tag
95 - $first_sign_after_begin_emph_tag;
97 if ($last_sign_after_end_emph_tag) {
98 $italic_text = substr($single_entry, $first_sign_after_begin_emph_tag, $italic_text_length);
100 $it_tpl =
new ilTemplate(
"tpl.bibliographic_italicizer.html",
true,
true,
"Modules/Bibliographic");
101 $it_tpl->setCurrentBlock(
"italic_section");
102 $it_tpl->setVariable(
'ITALIC_STRING', $italic_text);
103 $it_tpl->parseCurrentBlock();
105 $text_before_emph_tag = substr($single_entry, 0, $first_sign_after_begin_emph_tag
107 $text_after_emph_tag = substr($single_entry, $last_sign_after_end_emph_tag
109 $single_entry = $text_before_emph_tag . $it_tpl->get()
110 . $text_after_emph_tag;
112 }
while ($last_sign_after_end_emph_tag);
115 $single_entry = str_replace($placeholders[0][$key],
'', $single_entry);
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Interface ilBiblFactoryFacadeInterface.
__construct(ilBiblEntry $entry, ilBiblFactoryFacadeInterface $facade)
ilBiblEntryTablePresentationGUI constructor.