19use Psr\Http\Message\RequestInterface;
46 $this->tree =
$DIC->repositoryTree();
48 $this->request =
$DIC->http()->request();
49 $this->
ctrl = $DIC->ctrl();
50 $this->
logger = $DIC->logger()->cont();
52 $this->container_service =
$DIC->container();
70 public function setContainer(
int $container): void
73 ilSession::set(self::SESSION_MEMBER_VIEW_CONTAINER, $this->container);
76 $this->container_service
90 if (!isset($mv_status)) {
93 return $mv_status =
false;
98 return $mv_status =
false;
105 return $mv_status =
false;
107 return $mv_status =
true;
118 if (!$this->active || !$a_ref_id) {
123 !in_array($a_ref_id, $this->container_items) &&
135 $this->active =
true;
136 $this->setContainer($a_ref_id);
141 $this->active =
false;
142 $this->container =
null;
169 protected function read(): void
177 $this->enabled =
true;
180 $this->active =
true;
182 $this->container_items = $this->tree->getSubTreeIds($this->
getContainer());
201 $ref_id = (
int) ($this->request->getQueryParams()[
'ref_id'] ?? 0);
203 return $this->current_ref_id =
$ref_id;
205 $target_str = (string) ($this->request->getQueryParams()[
'target'] ??
'');
206 if ($target_str !==
'') {
207 $target_arr = explode(
'_', $target_str);
208 if (isset($target_arr[1]) && (
int) $target_arr[1]) {
209 $this->current_ref_id = (
int) $target_arr[1];
Class ilCtrl provides processing control methods.
Component logger with individual log levels by component id.
Settings for members view.
static ilMemberViewSettings $instance
isActive()
Check if member view currently enabled.
findEffectiveRefId()
Find effective ref_id for request.
const SESSION_MEMBER_VIEW_CONTAINER
isEnabled()
Check if members view is enabled in the administration.
Container Service $container_service
isActiveForRefId(int $a_ref_id)
Check if member view is currently enabled for given ref id.
activate(int $a_ref_id)
Enable member view for this session and container.
toggleActivation(int $a_ref_id, bool $a_activation)
Toggle activation status.
RequestInterface $request
static getInstanceByRefId(int $ref_id, bool $stop_on_error=true)
get an instance of an Ilias object by reference id
static get(string $a_var)
static clear(string $a_var)
static set(string $a_var, $a_val)
Set a value.
Tree class data representation in hierachical trees using the Nested Set Model with Gaps by Joe Celco...