ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilBiblEntryDetailPresentationGUI Class Reference

Class ilBiblEntryDetailPresentationGUI. 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

Constructor & Destructor Documentation

◆ __construct()

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

ilBiblEntryPresentationGUI constructor.

Parameters
\ilBiblEntry$entry
\ilBiblFactoryFacade$facade

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

References $DIC, $entry, and $facade.

Member Function Documentation

◆ getHTML()

ilBiblEntryDetailPresentationGUI::getHTML ( )
Returns
string

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

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

61  {
62  $this->initHelp();
63  $this->initTabs();
64 
65  $form = new ilPropertyFormGUI();
66  $form->setTitle($this->lng()->txt('detail_view'));
67 
68  $this->renderAttributes($form);
69  $this->renderLibraries($form);
70 
71  $this->tpl()->setPermanentLink(
72  "bibl",
73  $this->facade->iliasRefId(),
75  );
76 
77  return $form->getHTML();
78  }
This class represents a property form user interface.
$_GET["client_id"]
if(isset($_POST['submit'])) $form
+ Here is the call graph for this function:

◆ initTabs()

ilBiblEntryDetailPresentationGUI::initTabs ( )
private

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

References ilObjBibliographicGUI\CMD_SHOW_CONTENT.

Referenced by getHTML().

48  {
49  $this->tabs()->clearTargets();
50  $this->tabs()->setBackTarget(
51  $this->lng()->txt("back"),
52  $this->ctrl()->getLinkTargetByClass(ilObjBibliographicGUI::class, ilObjBibliographicGUI::CMD_SHOW_CONTENT)
53  );
54  }
+ 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 122 of file class.ilBiblEntryDetailPresentationGUI.php.

References ilMathJax\getInstance().

Referenced by ilBiblEntryTableGUI\fillRow().

123  {
124  return $string;
125  static $init;
126  $ilMathJax = ilMathJax::getInstance();
127  if (!$init) {
128  $ilMathJax->init();
129  $init = true;
130  }
131 
132  // $string = preg_replace('/\\$\\\\(.*)\\$/u', '[tex]$1[/tex]', $string);
133  $string = preg_replace('/\\$(.*)\\$/u', '[tex]$1[/tex]', $string);
134 
135  return $ilMathJax->insertLatexImages($string);
136  }
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 84 of file class.ilBiblEntryDetailPresentationGUI.php.

References $attributes, and ilPropertyFormGUI\addItem().

Referenced by getHTML().

85  {
86  $attributes = $this->facade->attributeFactory()->getAttributesForEntry($this->entry);
87  $sorted = $this->facade->attributeFactory()->sortAttributes($attributes);
88 
89  foreach ($sorted as $attribute) {
90  $translated = $this->facade->translationFactory()->translateAttribute($attribute);
91  $ci = new ilNonEditableValueGUI($translated);
92  $ci->setValue(self::prepareLatex($attribute->getValue()));
93  $form->addItem($ci);
94  }
95  }
addItem($a_item)
Add Item (Property, SectionHeader).
if(array_key_exists('yes', $_REQUEST)) $attributes
Definition: getconsent.php:85
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 101 of file class.ilBiblEntryDetailPresentationGUI.php.

References ilPropertyFormGUI\addItem().

Referenced by getHTML().

102  {
103  // generate/render links to libraries
104  // TODO REFACTOR
105  $settings = $this->facade->libraryFactory()->getAll();
106  foreach ($settings as $set) {
107  $ci = new ilCustomInputGUI($set->getName());
108  $presentation = new ilBiblLibraryPresentationGUI($set, $this->facade);
109  $ci->setHtml($presentation->getButton($this->facade, $this->entry));
110  $form->addItem($ci);
111  }
112  }
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 15 of file class.ilBiblEntryDetailPresentationGUI.php.

Referenced by __construct().

◆ $facade

ilBiblEntryDetailPresentationGUI::$facade
protected

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

Referenced by __construct().


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