ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilMMAbstractItemGUI Class Reference

Class ilMMAbstractItemGUI. More...

+ Inheritance diagram for ilMMAbstractItemGUI:
+ Collaboration diagram for ilMMAbstractItemGUI:

Public Member Functions

 __construct (ilMMTabHandling $tab_handling)
 ilMMAbstractItemGUI constructor. More...
 

Data Fields

const IDENTIFIER = 'identifier'
 
const CMD_FLUSH = 'flush'
 
ilLanguage $lng
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 

Protected Member Functions

 determineCommand (string $standard, string $delete)
 
 getMMItemFromRequest ()
 
 flush ()
 
 cancel ()
 

Protected Attributes

UIServices $ui
 
Services $http
 
ilMMItemRepository $repository
 
ilToolbarGUI $toolbar
 
ilMMTabHandling $tab_handling
 
ilTabsGUI $tabs
 
ilCtrl $ctrl
 
ilObjMainMenuAccess $access
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMMAbstractItemGUI::__construct ( ilMMTabHandling  $tab_handling)

ilMMAbstractItemGUI constructor.

Parameters
ilMMTabHandling$tab_handling
Exceptions
Throwable

Definition at line 62 of file class.ilMMAbstractItemGUI.php.

References $DIC, $tab_handling, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), ILIAS\FileDelivery\http(), ILIAS\Repository\lng(), ILIAS\UI\examples\Deck\repository(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), and ILIAS\Repository\ui().

63  {
64  global $DIC;
65 
66  $this->repository = new ilMMItemRepository();
67  $this->tab_handling = $tab_handling;
68  $this->tabs = $DIC['ilTabs'];
69  $this->lng = $DIC->language();
70  $this->ctrl = $DIC['ilCtrl'];
71  $this->tpl = $DIC['tpl'];
72  $this->tree = $DIC['tree'];
73  $this->toolbar = $DIC['ilToolbar'];
74  $this->http = $DIC->http();
75  $this->ui = $DIC->ui();
76  $this->access = new ilObjMainMenuAccess();
77 
78  $this->lng->loadLanguageModule('form');
79  }
Class ilMMItemRepository.
global $DIC
Definition: feed.php:28
static http()
Fetches the global http state from ILIAS.
+ Here is the call graph for this function:

Member Function Documentation

◆ cancel()

ilMMAbstractItemGUI::cancel ( )
abstractprotected

Referenced by flush().

+ Here is the caller graph for this function:

◆ determineCommand()

ilMMAbstractItemGUI::determineCommand ( string  $standard,
string  $delete 
)
protected
Parameters
string$standard
string$delete
Returns
string
Exceptions
ilException

Definition at line 87 of file class.ilMMAbstractItemGUI.php.

References $post, ILIAS\Repository\access(), ILIAS\Repository\ctrl(), and ILIAS\FileDelivery\http().

Referenced by ilMMSubItemGUI\executeCommand(), and ilMMTopItemGUI\executeCommand().

87  : string
88  {
89  $this->access->checkAccessAndThrowException('visible,read');
90  $cmd = $this->ctrl->getCmd();
91  if ($cmd !== '') {
92  return $cmd;
93  }
94 
95  $r = $this->http->request();
96  $post = $r->getParsedBody();
97 
98  if ($cmd == "" && isset($post['interruptive_items'])) {
99  $cmd = $delete;
100  } else {
101  $cmd = $standard;
102  }
103 
104  return $cmd;
105  }
static http()
Fetches the global http state from ILIAS.
$post
Definition: ltitoken.php:49
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ flush()

ilMMAbstractItemGUI::flush ( )
protected

Definition at line 127 of file class.ilMMAbstractItemGUI.php.

References cancel(), ILIAS\Repository\lng(), and ILIAS\UI\examples\Deck\repository().

Referenced by ilMMSubItemGUI\dispatchCommand(), and ilMMTopItemGUI\dispatchCommand().

127  : void
128  {
129  $this->repository->flushLostItems();
130  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_subitem_flushed"), true);
131  $this->cancel();
132  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ getMMItemFromRequest()

ilMMAbstractItemGUI::getMMItemFromRequest ( )
protected
Returns
ilMMItemFacadeInterface
Exceptions
Throwable

Definition at line 111 of file class.ilMMAbstractItemGUI.php.

References $post, ILIAS\FileDelivery\http(), and ILIAS\UI\examples\Deck\repository().

Referenced by ilMMSubItemGUI\confirmDelete(), ilMMTopItemGUI\confirmDelete(), ilMMSubItemGUI\confirmMove(), ilMMSubItemGUI\delete(), ilMMTopItemGUI\delete(), ilMMSubItemGUI\edit(), ilMMTopItemGUI\edit(), ilMMSubItemGUI\executeCommand(), ilMMTopItemGUI\executeCommand(), ilMMSubItemGUI\move(), ilMMTopItemGUI\move(), ilMMSubItemGUI\update(), and ilMMTopItemGUI\update().

112  {
113  $r = $this->http->request();
114  $get = $r->getQueryParams();
115  $post = $r->getParsedBody();
116 
117  if (isset($post['interruptive_items'])) {
118  $string = $post['interruptive_items'][0];
119  $identification = $this->unhash($string);
120  } else {
121  $identification = $this->unhash($get[self::IDENTIFIER]);
122  }
123 
124  return $this->repository->getItemFacadeForIdentificationString($identification);
125  }
static http()
Fetches the global http state from ILIAS.
$post
Definition: ltitoken.php:49
Interface ilMMItemFacadeInterface.
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Field Documentation

◆ $access

ilObjMainMenuAccess ilMMAbstractItemGUI::$access
protected

Definition at line 55 of file class.ilMMAbstractItemGUI.php.

◆ $ctrl

ilCtrl ilMMAbstractItemGUI::$ctrl
protected

Definition at line 49 of file class.ilMMAbstractItemGUI.php.

◆ $http

Services ilMMAbstractItemGUI::$http
protected

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

◆ $lng

◆ $repository

◆ $tab_handling

ilMMTabHandling ilMMAbstractItemGUI::$tab_handling
protected

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

Referenced by __construct().

◆ $tabs

ilTabsGUI ilMMAbstractItemGUI::$tabs
protected

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

◆ $toolbar

ilToolbarGUI ilMMAbstractItemGUI::$toolbar
protected

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

◆ $tpl

ilGlobalTemplateInterface ilMMAbstractItemGUI::$tpl

Definition at line 51 of file class.ilMMAbstractItemGUI.php.

◆ $tree

ilTree ilMMAbstractItemGUI::$tree

Definition at line 53 of file class.ilMMAbstractItemGUI.php.

◆ $ui

UIServices ilMMAbstractItemGUI::$ui
protected

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

◆ CMD_FLUSH

const ilMMAbstractItemGUI::CMD_FLUSH = 'flush'

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

◆ IDENTIFIER

const ilMMAbstractItemGUI::IDENTIFIER = 'identifier'

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