ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
All Data Structures Namespaces Files Functions Variables Modules Pages
MakeSlateAsync.php
Go to the documentation of this file.
1 <?php
2 
4 
7 
13 trait MakeSlateAsync
14 {
15  use Hasher;
16 
17 
24  protected function addAsyncLoadingCode(Slate $slate, supportsAsynchronousLoading $item) : Slate
25  {
26  if ($item->supportsAsynchronousLoading() === false) {
27  return $slate;
28  }
29 
30  $serialize = $item->getProviderIdentification()->serialize();
31  $replace_signal = $slate->getReplaceSignal()->withAsyncRenderUrl("./gs_content.php?item={$this->hash($serialize)}");
32 
33  $slate = $slate->appendOnFirstView($replace_signal);
34 
35  return $slate;
36  }
37 }
getReplaceSignal()
Signal to replace the contents of the slate.
addAsyncLoadingCode(Slate $slate, supportsAsynchronousLoading $item)