ILIAS  trunk Revision v11.0_alpha-1831-g8615d53dadb
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\Component\Legacy\Content\ItemManager Class Reference

Acts on single items. More...

+ Collaboration diagram for ILIAS\UI\Component\Legacy\Content\ItemManager:

Public Member Functions

 __construct (\ilContainer $container, ItemSessionRepository $item_repo, ModeManager $mode_manager, \ILIAS\Container\StandardGUIRequest $request)
 
 setExpanded (int $id, int $val)
 
 getExpanded (int $id)
 

Protected Member Functions

 handleSessionExpand ()
 
 init ()
 
 getDetailsLevel (int $a_item_id)
 

Protected Attributes

ILIAS Container StandardGUIRequest $request
 
array $force_details = []
 
ModeManager $mode_manager
 
ilContainer $container
 
ItemSessionRepository $item_repo
 

Detailed Description

Acts on single items.

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 27 of file class.ItemManager.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\UI\Component\Legacy\Content\ItemManager::__construct ( \ilContainer  $container,
ItemSessionRepository  $item_repo,
ModeManager  $mode_manager,
\ILIAS\Container\StandardGUIRequest  $request 
)

Member Function Documentation

◆ getDetailsLevel()

ILIAS\UI\Component\Legacy\Content\ItemManager::getDetailsLevel ( int  $a_item_id)
protected

Definition at line 84 of file class.ItemManager.php.

References ILIAS\UI\Component\Legacy\Content\ItemManager\getExpanded(), and null.

84  : int
85  {
86  if ($this->mode_manager->isAdminMode()) {
87  return \ilContainerContentGUI::DETAILS_DEACTIVATED;
88  }
89  if ($this->getExpanded($a_item_id) !== null) {
90  return $this->getExpanded($a_item_id);
91  }
92  if (in_array($a_item_id, $this->force_details)) {
93  return \ilContainerContentGUI::DETAILS_ALL;
94  }
95  return \ilContainerContentGUI::DETAILS_TITLE;
96  }
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
+ Here is the call graph for this function:

◆ getExpanded()

ILIAS\UI\Component\Legacy\Content\ItemManager::getExpanded ( int  $id)

Definition at line 79 of file class.ItemManager.php.

Referenced by ILIAS\UI\Component\Legacy\Content\ItemManager\getDetailsLevel().

79  : ?int
80  {
81  return $this->item_repo->getExpanded($id);
82  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the caller graph for this function:

◆ handleSessionExpand()

ILIAS\UI\Component\Legacy\Content\ItemManager::handleSessionExpand ( )
protected
Todo:
this is GUI class responsibility, might go to top of ilContainerContentGUI

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

References ilContainerContentGUI\DETAILS_ALL, ilContainerContentGUI\DETAILS_TITLE, and ILIAS\UI\Component\Legacy\Content\ItemManager\setExpanded().

Referenced by ILIAS\UI\Component\Legacy\Content\ItemManager\init().

51  : void
52  {
53  $expand = $this->request->getExpand();
54  if ($expand > 0) {
55  $this->setExpanded(abs($expand), \ilContainerContentGUI::DETAILS_ALL);
56  } elseif ($expand < 0) {
58  }
59  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ init()

ILIAS\UI\Component\Legacy\Content\ItemManager::init ( )
protected

Definition at line 61 of file class.ItemManager.php.

References ILIAS\UI\Component\Legacy\Content\ItemManager\handleSessionExpand(), ilSessionAppointment\lookupLastSessionByCourse(), and ilSessionAppointment\lookupNextSessionByCourse().

Referenced by ILIAS\UI\Component\Legacy\Content\ItemManager\__construct().

61  : void
62  {
63  $this->handleSessionExpand();
64 
65  if ($this->container->getType() === 'crs') {
66  if ($session = \ilSessionAppointment::lookupNextSessionByCourse($this->container->getRefId())) {
67  $this->force_details = $session;
68  } elseif ($session = \ilSessionAppointment::lookupLastSessionByCourse($this->container->getRefId())) {
69  $this->force_details = [$session];
70  }
71  }
72  }
static lookupNextSessionByCourse(int $a_ref_id)
static lookupLastSessionByCourse(int $a_ref_id)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setExpanded()

ILIAS\UI\Component\Legacy\Content\ItemManager::setExpanded ( int  $id,
int  $val 
)

Definition at line 74 of file class.ItemManager.php.

Referenced by ILIAS\UI\Component\Legacy\Content\ItemManager\handleSessionExpand().

74  : void
75  {
76  $this->item_repo->setExpanded($id, $val);
77  }
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
+ Here is the caller graph for this function:

Field Documentation

◆ $container

ilContainer ILIAS\UI\Component\Legacy\Content\ItemManager::$container
protected

◆ $force_details

array ILIAS\UI\Component\Legacy\Content\ItemManager::$force_details = []
protected

Definition at line 30 of file class.ItemManager.php.

◆ $item_repo

ItemSessionRepository ILIAS\UI\Component\Legacy\Content\ItemManager::$item_repo
protected

◆ $mode_manager

ModeManager ILIAS\UI\Component\Legacy\Content\ItemManager::$mode_manager
protected

◆ $request

ILIAS Container StandardGUIRequest ILIAS\UI\Component\Legacy\Content\ItemManager::$request
protected

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