ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ILIAS\UI\Component\Legacy\Content\ModeManager Class Reference
+ Collaboration diagram for ILIAS\UI\Component\Legacy\Content\ModeManager:

Public Member Functions

 __construct (\ilContainer $container, ModeSessionRepository $mode_repo, \ILIAS\Repository\Clipboard\ClipboardManager $clipboard, int $user_id)
 
 setAdminMode ()
 
 setContentMode ()
 
 setOrderingMode ()
 
 isAdminMode ()
 
 isContentMode ()
 
 isOrderingMode ()
 
 showAdminCheckboxes ()
 
 isActiveItemOrdering ()
 

Protected Attributes

int $user_id
 
bool $ordering_mode = false
 
ILIAS Repository Clipboard ClipboardManager $clipboard
 
ModeSessionRepository $mode_repo
 
ilContainer $container
 

Detailed Description

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

Definition at line 26 of file class.ModeManager.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\UI\Component\Legacy\Content\ModeManager::__construct ( \ilContainer  $container,
ModeSessionRepository  $mode_repo,
\ILIAS\Repository\Clipboard\ClipboardManager  $clipboard,
int  $user_id 
)

Member Function Documentation

◆ isActiveItemOrdering()

ILIAS\UI\Component\Legacy\Content\ModeManager::isActiveItemOrdering ( )

Definition at line 85 of file class.ModeManager.php.

References ilContainerSortingSettings\_lookupSortMode(), ILIAS\UI\Component\Legacy\Content\ModeManager\isOrderingMode(), ilContainer\SORT_MANUAL, and ilContainer\VIEW_OBJECTIVE.

85  : bool
86  {
87  if ($this->isOrderingMode()) {
88  if ($this->container->getViewMode() == \ilContainer::VIEW_OBJECTIVE) {
89  return false;
90  }
91  return (\ilContainerSortingSettings::_lookupSortMode($this->container->getId()) === \ilContainer::SORT_MANUAL);
92  }
93  return false;
94  }
+ Here is the call graph for this function:

◆ isAdminMode()

ILIAS\UI\Component\Legacy\Content\ModeManager::isAdminMode ( )

Definition at line 65 of file class.ModeManager.php.

Referenced by ILIAS\UI\Component\Legacy\Content\ModeManager\showAdminCheckboxes().

65  : bool
66  {
67  return $this->mode_repo->isAdminMode();
68  }
+ Here is the caller graph for this function:

◆ isContentMode()

ILIAS\UI\Component\Legacy\Content\ModeManager::isContentMode ( )

Definition at line 70 of file class.ModeManager.php.

70  : bool
71  {
72  return $this->mode_repo->isContentMode();
73  }

◆ isOrderingMode()

ILIAS\UI\Component\Legacy\Content\ModeManager::isOrderingMode ( )

Definition at line 75 of file class.ModeManager.php.

References ILIAS\UI\Component\Legacy\Content\ModeManager\$ordering_mode.

Referenced by ILIAS\UI\Component\Legacy\Content\ModeManager\isActiveItemOrdering().

75  : bool
76  {
77  return $this->ordering_mode;
78  }
+ Here is the caller graph for this function:

◆ setAdminMode()

ILIAS\UI\Component\Legacy\Content\ModeManager::setAdminMode ( )

Definition at line 46 of file class.ModeManager.php.

References ANONYMOUS_USER_ID.

46  : void
47  {
48  if (in_array($this->user_id, [ANONYMOUS_USER_ID, 0], true)) {
49  return;
50  }
51  $this->mode_repo->setAdminMode();
52  }
const ANONYMOUS_USER_ID
Definition: constants.php:27

◆ setContentMode()

ILIAS\UI\Component\Legacy\Content\ModeManager::setContentMode ( )

Definition at line 54 of file class.ModeManager.php.

54  : void
55  {
56  $this->mode_repo->setContentMode();
57  }

◆ setOrderingMode()

ILIAS\UI\Component\Legacy\Content\ModeManager::setOrderingMode ( )

Definition at line 59 of file class.ModeManager.php.

59  : void
60  {
61  $this->mode_repo->setContentMode();
62  $this->ordering_mode = true;
63  }

◆ showAdminCheckboxes()

ILIAS\UI\Component\Legacy\Content\ModeManager::showAdminCheckboxes ( )

Definition at line 80 of file class.ModeManager.php.

References ILIAS\UI\Component\Legacy\Content\ModeManager\isAdminMode().

80  : bool
81  {
82  return ($this->isAdminMode() && !$this->clipboard->hasEntries());
83  }
+ Here is the call graph for this function:

Field Documentation

◆ $clipboard

ILIAS Repository Clipboard ClipboardManager ILIAS\UI\Component\Legacy\Content\ModeManager::$clipboard
protected

◆ $container

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

◆ $mode_repo

ModeSessionRepository ILIAS\UI\Component\Legacy\Content\ModeManager::$mode_repo
protected

◆ $ordering_mode

bool ILIAS\UI\Component\Legacy\Content\ModeManager::$ordering_mode = false
protected

◆ $user_id

int ILIAS\UI\Component\Legacy\Content\ModeManager::$user_id
protected

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