36 $attributes = $this->
getEntry()->getAttributes();
41 $entryType = $this->
getEntry()->getType();
43 if (! $overviewModels[$this->
getEntry()->getFileType()][$entryType]) {
44 $entryType =
'default';
46 $single_entry = $overviewModels[$this->
getEntry()->getFileType()][$entryType];
49 preg_match_all(
'/\[(.*?)\]/', $single_entry, $placeholders);
50 foreach ($placeholders[1] as $key => $placeholder) {
52 $cuts = explode(
'|', $placeholder);
54 if (! $attributes[$cuts[1]]) {
55 $attribute_elements = explode(
'_', $cuts[1]);
56 $attribute_elements[1] = strtolower($this->
getEntry()->getType());
57 $cuts[1] = implode(
'_', $attribute_elements);
59 if ($attributes[$cuts[1]]) {
61 $single_entry = str_replace($placeholders[0][$key], $cuts[0] . $attributes[$cuts[1]] . $cuts[2], $single_entry);
64 $first_sign_after_begin_emph_tag = strpos(strtolower($single_entry),
'<emph>') + 6;
65 $last_sign_after_end_emph_tag = strpos(strtolower($single_entry),
'</emph>');
66 $italic_text_length = $last_sign_after_end_emph_tag - $first_sign_after_begin_emph_tag;
68 if ($last_sign_after_end_emph_tag) {
69 $italic_text = substr($single_entry, $first_sign_after_begin_emph_tag, $italic_text_length);
71 $it_tpl =
new ilTemplate(
"tpl.bibliographic_italicizer.html",
true,
true,
"Modules/Bibliographic");
72 $it_tpl->setCurrentBlock(
"italic_section");
73 $it_tpl->setVariable(
'ITALIC_STRING', $italic_text);
74 $it_tpl->parseCurrentBlock();
76 $text_before_emph_tag = substr($single_entry, 0, $first_sign_after_begin_emph_tag - 6);
77 $text_after_emph_tag = substr($single_entry, $last_sign_after_end_emph_tag + 7);
78 $single_entry = $text_before_emph_tag . $it_tpl->get() . $text_after_emph_tag;
80 }
while ($last_sign_after_end_emph_tag);
83 $single_entry = str_replace($placeholders[0][$key],
'', $single_entry);
special template class to simplify handling of ITX/PEAR
Class ilBibliographicEntry.
static getAllOverviewModels()
__construct(ilBibliographicEntry $entry)
ilBiblOverviewGUI constructor.