ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilMDCopyrightUsageGUI Class Reference
+ Collaboration diagram for ilMDCopyrightUsageGUI:

Public Member Functions

 __construct (EntryInterface $entry)
 
 executeCommand ()
 
 showUsageTable ()
 
 getEntryId ()
 
 getEntryTitle ()
 

Data Fields

const string DEFAULT_CMD = 'showUsageTable'
 

Protected Member Functions

 applyUsageFilter ()
 
 resetUsageFilter ()
 
 setTabs ()
 

Protected Attributes

EntryInterface $entry
 
ilGlobalTemplateInterface $tpl
 
ilCtrl $ctrl
 
ilLanguage $lng
 
ilTabsGUI $tabs
 
GlobalHttpState $http
 
Factory $refinery
 

Detailed Description

Author
Jesús López lopez.nosp@m.@lei.nosp@m.fos.c.nosp@m.om @ilCtrl_Calls ilMDCopyrightUsageGUI: ILIAS\User\Profile\PublicProfileGUI

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

Constructor & Destructor Documentation

◆ __construct()

ilMDCopyrightUsageGUI::__construct ( EntryInterface  $entry)

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

45 {
46 global $DIC;
47
48 $this->tpl = $DIC->ui()->mainTemplate();
49 $this->http = $DIC->http();
50 $this->ctrl = $DIC->ctrl();
51 $this->lng = $DIC->language();
52 $this->tabs = $DIC->tabs();
53 $this->refinery = $DIC->refinery();
54
55 $this->entry = $entry;
56 }
static http()
Fetches the global http state from ILIAS.
global $DIC
Definition: shib_login.php:26

References $DIC, $entry, ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\Repository\refinery(), and ILIAS\Repository\tabs().

+ Here is the call graph for this function:

Member Function Documentation

◆ applyUsageFilter()

ilMDCopyrightUsageGUI::applyUsageFilter ( )
protected

Definition at line 119 of file class.ilMDCopyrightUsageGUI.php.

119 : void
120 {
121 $table_gui = new ilMDCopyrightUsageTableGUI(
122 $this,
123 self::DEFAULT_CMD,
124 );
125 $table_gui->init();
126 $table_gui->resetOffset(); // sets record offset to 0 (first page)
127 $table_gui->writeFilterToSession(); // writes filter to session
128
129 $this->ctrl->redirect($this, self::DEFAULT_CMD);
130 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ executeCommand()

ilMDCopyrightUsageGUI::executeCommand ( )

Definition at line 58 of file class.ilMDCopyrightUsageGUI.php.

58 : void
59 {
60 // save usage id for all request
61 $this->ctrl->saveParameter($this, 'entry_id');
62
63 $user = '';
64 if ($this->http->wrapper()->query()->has('user')) {
65 $user = $this->http->wrapper()->query()->retrieve(
66 'user',
67 $this->refinery->kindlyTo()->string()
68 );
69 }
70
71 $this->setTabs();
72 $next_class = $this->ctrl->getNextClass($this);
73 switch ($this->ctrl->getNextClass($this)) {
74 case strtolower(PublicProfileGUI::class):
75 $profile_gui = new PublicProfileGUI($this->http->wrapper()->query()->retrieve(
76 'user',
77 $this->refinery->kindlyTo()->int()
78 ));
79 $profile_gui->setBackUrl(
80 $this->ctrl->getLinkTarget($this, self::DEFAULT_CMD)
81 );
82 $html = $this->ctrl->forwardCommand($profile_gui);
83 $this->tpl->setContent($html);
84 break;
85
86 default:
87 $cmd = $this->ctrl->getCmd(self::DEFAULT_CMD);
88 $this->$cmd();
89 break;
90 }
91 }
GUI class for public user profile presentation.
setBackUrl(string $backurl)
Set Back Link URL.

References ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\refinery(), and setTabs().

+ Here is the call graph for this function:

◆ getEntryId()

ilMDCopyrightUsageGUI::getEntryId ( )

Definition at line 109 of file class.ilMDCopyrightUsageGUI.php.

109 : int
110 {
111 return $this->entry->id();
112 }

Referenced by ilMDCopyrightUsageTableGUI\__construct().

+ Here is the caller graph for this function:

◆ getEntryTitle()

ilMDCopyrightUsageGUI::getEntryTitle ( )

Definition at line 114 of file class.ilMDCopyrightUsageGUI.php.

114 : string
115 {
116 return $this->entry->title();
117 }

Referenced by ilMDCopyrightUsageTableGUI\__construct().

+ Here is the caller graph for this function:

◆ resetUsageFilter()

ilMDCopyrightUsageGUI::resetUsageFilter ( )
protected

Definition at line 132 of file class.ilMDCopyrightUsageGUI.php.

132 : void
133 {
134 $table_gui = new ilMDCopyrightUsageTableGUI(
135 $this,
136 self::DEFAULT_CMD,
137 );
138 $table_gui->init();
139 $table_gui->resetOffset(); // sets record offest to 0 (first page)
140 $table_gui->resetFilter(); // clears filter
141
142 $this->ctrl->redirect($this, self::DEFAULT_CMD);
143 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ setTabs()

ilMDCopyrightUsageGUI::setTabs ( )
protected

Definition at line 145 of file class.ilMDCopyrightUsageGUI.php.

145 : void
146 {
147 $this->tabs->clearTargets();
148 $this->tabs->setBackTarget(
149 $this->lng->txt('back'),
150 $this->ctrl->getParentReturn($this)
151 );
152 }

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

Referenced by executeCommand().

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

◆ showUsageTable()

ilMDCopyrightUsageGUI::showUsageTable ( )

Definition at line 93 of file class.ilMDCopyrightUsageGUI.php.

93 : void
94 {
95 $this->tpl->setOnScreenMessage('info', $this->lng->txt("meta_info_only_repository_objects"));
96
97 $table_gui = new ilMDCopyrightUsageTableGUI(
98 $this,
99 self::DEFAULT_CMD,
100 );
101 $table_gui->setFilterCommand("applyUsageFilter");
102 $table_gui->setResetCommand("resetUsageFilter");
103 $table_gui->init();
104 $table_gui->parse();
105
106 $this->tpl->setContent($table_gui->getHTML());
107 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

Field Documentation

◆ $ctrl

ilCtrl ilMDCopyrightUsageGUI::$ctrl
protected

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

◆ $entry

EntryInterface ilMDCopyrightUsageGUI::$entry
protected

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

Referenced by __construct().

◆ $http

GlobalHttpState ilMDCopyrightUsageGUI::$http
protected

Definition at line 41 of file class.ilMDCopyrightUsageGUI.php.

◆ $lng

ilLanguage ilMDCopyrightUsageGUI::$lng
protected

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

◆ $refinery

Factory ilMDCopyrightUsageGUI::$refinery
protected

Definition at line 42 of file class.ilMDCopyrightUsageGUI.php.

◆ $tabs

ilTabsGUI ilMDCopyrightUsageGUI::$tabs
protected

Definition at line 40 of file class.ilMDCopyrightUsageGUI.php.

◆ $tpl

ilGlobalTemplateInterface ilMDCopyrightUsageGUI::$tpl
protected

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

◆ DEFAULT_CMD

const string ilMDCopyrightUsageGUI::DEFAULT_CMD = 'showUsageTable'

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


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