ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
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 $entry, and $facade.

Member Function Documentation

◆ getHTML()

ilBiblEntryDetailPresentationGUI::getHTML ( )
Returns
string

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

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 }
$_GET["client_id"]
This class represents a property form user interface.

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

+ Here is the call graph for this function:

◆ initTabs()

ilBiblEntryDetailPresentationGUI::initTabs ( )
private

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

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 }

References ilObjBibliographicGUI\CMD_SHOW_CONTENT.

Referenced by getHTML().

+ 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.

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.

References ilMathJax\getInstance().

Referenced by ilBiblEntryTableGUI\fillRow().

+ 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.

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 }
This class represents a non editable value in a property form.
addItem($a_item)
Add Item (Property, SectionHeader).
$attributes
Definition: metadata.php:231

References $attributes, and ilPropertyFormGUI\addItem().

Referenced by getHTML().

+ 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.

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 }
Class ilBiblLibraryPresentationGUI.
This class represents a custom property in a property form.

References ilPropertyFormGUI\addItem().

Referenced by getHTML().

+ 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: