ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilMMAbstractItemGUI Class Reference

Class ilMMAbstractItemGUI. More...

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

Public Member Functions

 __construct (protected 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
 
ilTabsGUI $tabs
 
ilCtrl $ctrl
 
ilObjMainMenuAccess $access
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMMAbstractItemGUI::__construct ( protected ilMMTabHandling  $tab_handling)

ilMMAbstractItemGUI constructor.

Parameters
ilMMTabHandling$tab_handling
Exceptions
Throwable

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

References $DIC, 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().

61  {
62  global $DIC;
63 
64  $this->repository = new ilMMItemRepository();
65  $this->tabs = $DIC['ilTabs'];
66  $this->lng = $DIC->language();
67  $this->ctrl = $DIC['ilCtrl'];
68  $this->tpl = $DIC['tpl'];
69  $this->tree = $DIC['tree'];
70  $this->toolbar = $DIC['ilToolbar'];
71  $this->http = $DIC->http();
72  $this->ui = $DIC->ui();
73  $this->access = new ilObjMainMenuAccess();
74 
75  $this->lng->loadLanguageModule('form');
76  }
repository()
description: > Example for rendering a repository card
Definition: repository.php:33
Class ilMMItemRepository.
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

◆ 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 84 of file class.ilMMAbstractItemGUI.php.

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

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

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

◆ flush()

ilMMAbstractItemGUI::flush ( )
protected

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

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

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

122  : void
123  {
124  $this->repository->flushLostItems();
125  $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_subitem_flushed"), true);
126  $this->cancel();
127  }
repository()
description: > Example for rendering a repository card
Definition: repository.php:33
+ 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 106 of file class.ilMMAbstractItemGUI.php.

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

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

107  {
108  $r = $this->http->request();
109  $get = $r->getQueryParams();
110  $post = $r->getParsedBody();
111 
112  if (isset($post['interruptive_items'])) {
113  $string = $post['interruptive_items'][0];
114  $identification = $this->unhash($string);
115  } else {
116  $identification = $this->unhash($get[self::IDENTIFIER]);
117  }
118 
119  return $this->repository->getItemFacadeForIdentificationString($identification);
120  }
repository()
description: > Example for rendering a repository card
Definition: repository.php:33
static http()
Fetches the global http state from ILIAS.
$post
Definition: ltitoken.php:46
Interface ilMMItemFacadeInterface.
$r
+ 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 53 of file class.ilMMAbstractItemGUI.php.

◆ $ctrl

ilCtrl ilMMAbstractItemGUI::$ctrl
protected

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

◆ $http

Services ilMMAbstractItemGUI::$http
protected

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

◆ $lng

◆ $repository

◆ $tabs

ilTabsGUI ilMMAbstractItemGUI::$tabs
protected

Definition at line 43 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 49 of file class.ilMMAbstractItemGUI.php.

◆ $tree

ilTree ilMMAbstractItemGUI::$tree

Definition at line 51 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: