ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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

Constructor & Destructor Documentation

◆ __construct()

ilMDCopyrightUsageGUI::__construct ( EntryInterface  $entry)

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

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

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

Member Function Documentation

◆ applyUsageFilter()

ilMDCopyrightUsageGUI::applyUsageFilter ( )
protected

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

References ILIAS\Repository\ctrl().

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

◆ executeCommand()

ilMDCopyrightUsageGUI::executeCommand ( )

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

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

57  : void
58  {
59  // save usage id for all request
60  $this->ctrl->saveParameter($this, 'entry_id');
61 
62  $user = '';
63  if ($this->http->wrapper()->query()->has('user')) {
64  $user = $this->http->wrapper()->query()->retrieve(
65  'user',
66  $this->refinery->kindlyTo()->string()
67  );
68  }
69 
70  $this->setTabs();
71  $next_class = $this->ctrl->getNextClass($this);
72  switch ($this->ctrl->getNextClass($this)) {
73  case 'ilpublicuserprofilegui':
74  $profile_gui = new ilPublicUserProfileGUI($this->http->wrapper()->query()->retrieve(
75  'user',
76  $this->refinery->kindlyTo()->int()
77  ));
78  $profile_gui->setBackUrl(
79  $this->ctrl->getLinkTarget($this, self::DEFAULT_CMD)
80  );
81  $html = $this->ctrl->forwardCommand($profile_gui);
82  $this->tpl->setContent($html);
83  break;
84 
85  default:
86  $cmd = $this->ctrl->getCmd(self::DEFAULT_CMD);
87  $this->$cmd();
88  break;
89  }
90  }
GUI class for public user profile presentation.
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

◆ getEntryId()

ilMDCopyrightUsageGUI::getEntryId ( )

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

Referenced by ilMDCopyrightUsageTableGUI\__construct().

108  : int
109  {
110  return $this->entry->id();
111  }
+ Here is the caller graph for this function:

◆ getEntryTitle()

ilMDCopyrightUsageGUI::getEntryTitle ( )

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

Referenced by ilMDCopyrightUsageTableGUI\__construct().

113  : string
114  {
115  return $this->entry->title();
116  }
+ Here is the caller graph for this function:

◆ resetUsageFilter()

ilMDCopyrightUsageGUI::resetUsageFilter ( )
protected

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

References ILIAS\Repository\ctrl().

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

◆ setTabs()

ilMDCopyrightUsageGUI::setTabs ( )
protected

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

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

Referenced by executeCommand().

144  : void
145  {
146  $this->tabs->clearTargets();
147  $this->tabs->setBackTarget(
148  $this->lng->txt('back'),
149  $this->ctrl->getParentReturn($this)
150  );
151  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ showUsageTable()

ilMDCopyrightUsageGUI::showUsageTable ( )

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

References ILIAS\Repository\lng().

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

Field Documentation

◆ $ctrl

ilCtrl ilMDCopyrightUsageGUI::$ctrl
protected

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

◆ $entry

EntryInterface ilMDCopyrightUsageGUI::$entry
protected

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

Referenced by __construct().

◆ $http

GlobalHttpState ilMDCopyrightUsageGUI::$http
protected

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

◆ $lng

ilLanguage ilMDCopyrightUsageGUI::$lng
protected

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

◆ $refinery

Factory ilMDCopyrightUsageGUI::$refinery
protected

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

◆ $tabs

ilTabsGUI ilMDCopyrightUsageGUI::$tabs
protected

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

◆ $tpl

ilGlobalTemplateInterface ilMDCopyrightUsageGUI::$tpl
protected

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

◆ DEFAULT_CMD

const string ilMDCopyrightUsageGUI::DEFAULT_CMD = 'showUsageTable'

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


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