ILIAS  release_7 Revision v7.30-3-g800a261c036
ilBiblEntryDetailPresentationGUI Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Collaboration diagram for ilBiblEntryDetailPresentationGUI:

Public Member Functions

 __construct (\ilBiblEntry $entry, ilBiblFactoryFacade $facade)
 ilBiblEntryPresentationGUI constructor. More...
 
 getHTML ()
 

Static Public Member Functions

static prepareLatex ($string)
 This feature has to be discussed by JF first. More...
 

Data Fields

 $entry
 

Protected Member Functions

 renderAttributes (ilPropertyFormGUI $form)
 
 renderLibraries (ilPropertyFormGUI $form)
 

Protected Attributes

 $facade
 

Private Member Functions

 initTabs ()
 

Detailed Description

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.

ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.

If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Class ilBiblEntryDetailPresentationGUI

Author
Martin Studer ms@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch
Fabian Schmid fs@st.nosp@m.uder.nosp@m.-raim.nosp@m.ann..nosp@m.ch

Definition at line 25 of file class.ilBiblEntryDetailPresentationGUI.php.

Constructor & Destructor Documentation

◆ __construct()

ilBiblEntryDetailPresentationGUI::__construct ( \ilBiblEntry  $entry,
ilBiblFactoryFacade  $facade 
)

ilBiblEntryPresentationGUI constructor.

Parameters
\ilBiblEntry$entry
\ilBiblFactoryFacade$facade

Definition at line 44 of file class.ilBiblEntryDetailPresentationGUI.php.

References $DIC, $entry, and $facade.

Member Function Documentation

◆ getHTML()

ilBiblEntryDetailPresentationGUI::getHTML ( )
Returns
string

Definition at line 76 of file class.ilBiblEntryDetailPresentationGUI.php.

References $_GET, initTabs(), ilObjBibliographicGUI\P_ENTRY_ID, renderAttributes(), and renderLibraries().

77  {
78  $this->initHelp();
79  $this->initTabs();
80 
81  $form = new ilPropertyFormGUI();
82  $form->setTitle($this->lng()->txt('detail_view'));
83 
84  $this->renderAttributes($form);
85  $this->renderLibraries($form);
86 
87  $this->tpl()->setPermanentLink(
88  "bibl",
89  $this->facade->iliasRefId(),
91  );
92 
93  return $form->getHTML();
94  }
This class represents a property form user interface.
$_GET["client_id"]
+ Here is the call graph for this function:

◆ initTabs()

ilBiblEntryDetailPresentationGUI::initTabs ( )
private

Definition at line 63 of file class.ilBiblEntryDetailPresentationGUI.php.

References ilObjBibliographicGUI\CMD_SHOW_CONTENT.

Referenced by getHTML().

64  {
65  $this->tabs()->clearTargets();
66  $this->tabs()->setBackTarget(
67  $this->lng()->txt("back"),
68  $this->ctrl()->getLinkTargetByClass(ilObjBibliographicGUI::class, ilObjBibliographicGUI::CMD_SHOW_CONTENT)
69  );
70  }
+ Here is the caller graph for this function:

◆ prepareLatex()

static ilBiblEntryDetailPresentationGUI::prepareLatex (   $string)
static

This feature has to be discussed by JF first.

Parameters
$string
Returns
string

Definition at line 138 of file class.ilBiblEntryDetailPresentationGUI.php.

References ilMathJax\getInstance().

Referenced by ilBiblEntryTableGUI\addAndReadFilterItem().

139  {
140  return $string;
141  static $init;
142  $ilMathJax = ilMathJax::getInstance();
143  if (!$init) {
144  $ilMathJax->init();
145  $init = true;
146  }
147 
148  // $string = preg_replace('/\\$\\\\(.*)\\$/u', '[tex]$1[/tex]', $string);
149  $string = preg_replace('/\\$(.*)\\$/u', '[tex]$1[/tex]', $string);
150 
151  return $ilMathJax->insertLatexImages($string);
152  }
static getInstance()
Singleton: get instance.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderAttributes()

ilBiblEntryDetailPresentationGUI::renderAttributes ( ilPropertyFormGUI  $form)
protected
Parameters
\ilPropertyFormGUI$form

Definition at line 100 of file class.ilBiblEntryDetailPresentationGUI.php.

References $attributes, and ilPropertyFormGUI\addItem().

Referenced by getHTML().

101  {
102  $attributes = $this->facade->attributeFactory()->getAttributesForEntry($this->entry);
103  $sorted = $this->facade->attributeFactory()->sortAttributes($attributes);
104 
105  foreach ($sorted as $attribute) {
106  $translated = $this->facade->translationFactory()->translateAttribute($attribute);
107  $ci = new ilNonEditableValueGUI($translated, '', true);
108  $ci->setValue(self::prepareLatex($attribute->getValue()));
109  $form->addItem($ci);
110  }
111  }
$attributes
Definition: metadata.php:231
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a non editable value in a property form.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ renderLibraries()

ilBiblEntryDetailPresentationGUI::renderLibraries ( ilPropertyFormGUI  $form)
protected
Parameters
\ilPropertyFormGUI$form

Definition at line 117 of file class.ilBiblEntryDetailPresentationGUI.php.

References ilPropertyFormGUI\addItem().

Referenced by getHTML().

118  {
119  // generate/render links to libraries
120  // TODO REFACTOR
121  $settings = $this->facade->libraryFactory()->getAll();
122  foreach ($settings as $set) {
123  $ci = new ilCustomInputGUI($set->getName());
124  $presentation = new ilBiblLibraryPresentationGUI($set, $this->facade);
125  $ci->setHtml($presentation->getButton($this->facade, $this->entry));
126  $form->addItem($ci);
127  }
128  }
addItem($a_item)
Add Item (Property, SectionHeader).
This class represents a custom property in a property form.
Class ilBiblLibraryPresentationGUI.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $entry

ilBiblEntryDetailPresentationGUI::$entry

Definition at line 31 of file class.ilBiblEntryDetailPresentationGUI.php.

Referenced by __construct().

◆ $facade

ilBiblEntryDetailPresentationGUI::$facade
protected

Definition at line 35 of file class.ilBiblEntryDetailPresentationGUI.php.

Referenced by __construct().


The documentation for this class was generated from the following file: