ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\Container\Content\ItemManager Class Reference

Acts on single items. More...

+ Collaboration diagram for ILIAS\Container\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\Container\Content\ItemManager::__construct ( \ilContainer  $container,
ItemSessionRepository  $item_repo,
ModeManager  $mode_manager,
\ILIAS\Container\StandardGUIRequest  $request 
)

Member Function Documentation

◆ getDetailsLevel()

ILIAS\Container\Content\ItemManager::getDetailsLevel ( int  $a_item_id)
protected

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

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 }

References ILIAS\Container\Content\ItemManager\getExpanded().

+ Here is the call graph for this function:

◆ getExpanded()

ILIAS\Container\Content\ItemManager::getExpanded ( int  $id)

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

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

References $id.

Referenced by ILIAS\Container\Content\ItemManager\getDetailsLevel().

+ Here is the caller graph for this function:

◆ handleSessionExpand()

ILIAS\Container\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.

51 : void
52 {
53 $expand = $this->request->getExpand();
54 if ($expand > 0) {
56 } elseif ($expand < 0) {
58 }
59 }

References ilContainerContentGUI\DETAILS_ALL, ilContainerContentGUI\DETAILS_TITLE, and ILIAS\Container\Content\ItemManager\setExpanded().

Referenced by ILIAS\Container\Content\ItemManager\init().

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

◆ init()

ILIAS\Container\Content\ItemManager::init ( )
protected

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

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)

References ILIAS\Container\Content\ItemManager\handleSessionExpand(), ilSessionAppointment\lookupLastSessionByCourse(), and ilSessionAppointment\lookupNextSessionByCourse().

Referenced by ILIAS\Container\Content\ItemManager\__construct().

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

◆ setExpanded()

ILIAS\Container\Content\ItemManager::setExpanded ( int  $id,
int  $val 
)

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

74 : void
75 {
76 $this->item_repo->setExpanded($id, $val);
77 }

References $id.

Referenced by ILIAS\Container\Content\ItemManager\handleSessionExpand().

+ Here is the caller graph for this function:

Field Documentation

◆ $container

ilContainer ILIAS\Container\Content\ItemManager::$container
protected

◆ $force_details

array ILIAS\Container\Content\ItemManager::$force_details = []
protected

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

◆ $item_repo

ItemSessionRepository ILIAS\Container\Content\ItemManager::$item_repo
protected

◆ $mode_manager

ModeManager ILIAS\Container\Content\ItemManager::$mode_manager
protected

◆ $request

ILIAS Container StandardGUIRequest ILIAS\Container\Content\ItemManager::$request
protected

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