ILIAS  release_9 Revision v9.13-25-g2c18ec4c24f
MemberViewLayoutProvider.php
Go to the documentation of this file.
1 <?php
2 
20 
21 use ILIAS\Data\URI;
30 use ilLink;
32 use ilObject;
33 
40 {
45  {
46  return $this->context_collection->repository();
47  }
48 
49  public static function getMemberViewModeInfo(\ILIAS\DI\Container $dic): ?ModeInfo
50  {
52  if (!$mv->isActive()) {
53  return null;
54  }
55  $ref_id = $mv->getCurrentRefId();
56  $url = new URI(
57  ilLink::_getLink(
58  $ref_id,
60  )
61  );
62  $url = $url->withParameter('mv', 0);
63 
64  $modeinfo = $dic->ui()->factory()->mainControls()->modeInfo(
65  $dic->language()->txt('mem_view_long'),
66  $url
67  );
68 
69  return $modeinfo;
70  }
71 
75  public function getPageBuilderDecorator(CalledContexts $screen_context_stack): ?PageBuilderModification
76  {
77  $mv_mode_info = self::getMemberViewModeInfo($this->dic);
78  if (is_null($mv_mode_info)) {
79  return null;
80  }
81 
82  return $this->factory->page()
83  ->withLowPriority()
84  ->withModification(
85  static function (PagePartProvider $parts) use ($mv_mode_info): Page {
86  $p = new StandardPageBuilder();
87  $page = $p->build($parts);
88  return $page->withModeInfo($mv_mode_info);
89  }
90  );
91  }
92 }
getPageBuilderDecorator(CalledContexts $screen_context_stack)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:64
Class ChatMainBarProvider .
Customizing of pimple-DIC for ILIAS.
Definition: Container.php:35
static _lookupObjId(int $ref_id)
$ref_id
Definition: ltiauth.php:67
Class HTTPServicesTest.
The scope of this class is split ilias-conform URI&#39;s into components.
Definition: URI.php:18
$url
Definition: ltiregstart.php:35
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This describes the Page.
Definition: Page.php:30
static _lookupType(int $id, bool $reference=false)