ILIAS  release_8 Revision v8.24
ilBiblEntryDetailPresentationGUI Class Reference

Class ilBiblEntryDetailPresentationGUI. More...

+ Collaboration diagram for ilBiblEntryDetailPresentationGUI:

Public Member Functions

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

Data Fields

ilBiblEntry $entry
 

Protected Attributes

ILIAS UI Renderer $ui_renderer
 
ILIAS UI Factory $ui_factory
 
ilGlobalTemplateInterface $main_tpl
 
ilCtrlInterface $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs
 
ilHelpGUI $help
 
ilBiblFactoryFacade $facade
 

Private Member Functions

 initHelp ()
 
 initTabs ()
 
 initPermanentLink ()
 
 getLibrariesDeck ()
 
 getOverviewPanel ()
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

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

ilBiblEntryPresentationGUI constructor.

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

46 {
47 global $DIC;
48 $this->help = $DIC['ilHelp'];
49 $this->facade = $facade;
50 $this->entry = $entry;
51 $this->tabs = $DIC->tabs();
52 $this->lng = $DIC->language();
53 $this->ctrl = $DIC->ctrl();
54 $this->main_tpl = $DIC->ui()->mainTemplate();
55 $this->ui_factory = $DIC->ui()->factory();
56 $this->ui_renderer = $DIC->ui()->renderer();
57 $this->initHelp();
58 $this->initTabs();
59 $this->initPermanentLink();
60 }
global $DIC
Definition: feed.php:28

References $DIC, $entry, $facade, ILIAS\Repository\ctrl(), ILIAS\Repository\help(), initHelp(), initPermanentLink(), initTabs(), ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

Member Function Documentation

◆ getHTML()

ilBiblEntryDetailPresentationGUI::getHTML ( )

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

88 : string
89 {
90 $sub_panels = [
91 $this->getOverviewPanel()
92 ];
93
94 if (($libraries = $this->getLibrariesDeck()) !== null) {
95 $sub_panels[] = $libraries;
96 }
97
98 return $this->ui_renderer->render(
99 $this->ui_factory->panel()->report($this->lng->txt('detail_view'), $sub_panels)
100 );
101 }

References getLibrariesDeck(), and getOverviewPanel().

+ Here is the call graph for this function:

◆ getLibrariesDeck()

ilBiblEntryDetailPresentationGUI::getLibrariesDeck ( )
private

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

103 : ?Sub
104 {
105 $settings = $this->facade->libraryFactory()->getAll();
106 if (count($settings) === 0) {
107 return null;
108 }
109
110 $data = [];
111
112 foreach ($settings as $set) {
113 $presentation = new ilBiblLibraryPresentationGUI($set, $this->facade);
114 $data[$set->getName()] = $presentation->getButton($this->facade, $this->entry);
115 }
116
117 return $this->ui_factory->panel()->sub(
118 $this->lng->txt('bibl_settings_libraries'),
119 $this->ui_factory->listing()->characteristicValue()->text($data)
120 );
121 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This describes a Sub Panel.
Definition: Sub.php:30
array $settings
Setting values (LTI parameters, custom parameters and local parameters).
Definition: System.php:200

References $data, ILIAS\LTI\ToolProvider\$settings, and ILIAS\Repository\lng().

Referenced by getHTML().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getOverviewPanel()

ilBiblEntryDetailPresentationGUI::getOverviewPanel ( )
private

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

123 : Sub
124 {
125 $attributes = $this->facade->attributeFactory()->getAttributesForEntry($this->entry);
126 $sorted = $this->facade->attributeFactory()->sortAttributes($attributes);
127 $data = [];
128 foreach ($sorted as $attribute) {
129 $translated = $this->facade->translationFactory()->translateAttribute($attribute);
130 $data[$translated] = $attribute->getValue();
131 }
132
133 $content = $this->ui_factory->listing()->characteristicValue()->text($data);
134
135 return $this->ui_factory->panel()->sub('', $content);
136 }
$attributes
Definition: metadata.php:248

References $attributes, and $data.

Referenced by getHTML().

+ Here is the caller graph for this function:

◆ initHelp()

ilBiblEntryDetailPresentationGUI::initHelp ( )
private

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

63 : void
64 {
65 $this->help->setScreenIdComponent('bibl');
66 }

References ILIAS\Repository\help().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initPermanentLink()

ilBiblEntryDetailPresentationGUI::initPermanentLink ( )
private

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

78 : void
79 {
80 $this->main_tpl->setPermanentLink(
81 "bibl",
82 $this->facade->iliasRefId(),
83 "_" . $this->entry->getId()
84 );
85 }

Referenced by __construct().

+ Here is the caller graph for this function:

◆ initTabs()

ilBiblEntryDetailPresentationGUI::initTabs ( )
private

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

69 : void
70 {
71 $this->tabs->clearTargets();
72 $this->tabs->setBackTarget(
73 $this->lng->txt("back"),
74 $this->ctrl->getLinkTargetByClass(ilObjBibliographicGUI::class, ilObjBibliographicGUI::CMD_SHOW_CONTENT)
75 );
76 }

References ilObjBibliographicGUI\CMD_SHOW_CONTENT, ILIAS\Repository\lng(), and ILIAS\Repository\tabs().

Referenced by __construct().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $ctrl

ilCtrlInterface ilBiblEntryDetailPresentationGUI::$ctrl
protected

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

◆ $entry

ilBiblEntry ilBiblEntryDetailPresentationGUI::$entry

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

Referenced by __construct().

◆ $facade

ilBiblFactoryFacade ilBiblEntryDetailPresentationGUI::$facade
protected

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

Referenced by __construct().

◆ $help

ilHelpGUI ilBiblEntryDetailPresentationGUI::$help
protected

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

◆ $lng

ilLanguage ilBiblEntryDetailPresentationGUI::$lng
protected

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

◆ $main_tpl

ilGlobalTemplateInterface ilBiblEntryDetailPresentationGUI::$main_tpl
protected

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

◆ $tabs

ilTabsGUI ilBiblEntryDetailPresentationGUI::$tabs
protected

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

◆ $ui_factory

ILIAS UI Factory ilBiblEntryDetailPresentationGUI::$ui_factory
protected

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

◆ $ui_renderer

ILIAS UI Renderer ilBiblEntryDetailPresentationGUI::$ui_renderer
protected

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


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