ILIAS  release_7 Revision v7.30-3-g800a261c036
MakeSlateAsync.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
21
24
30{
31 use Hasher;
32
38 protected function addAsyncLoadingCode(Slate $slate, supportsAsynchronousLoading $item) : Slate
39 {
40 if ($item->supportsAsynchronousLoading() === false) {
41 return $slate;
42 }
43
44 $serialize = $item->getProviderIdentification()->serialize();
45 $replace_signal = $slate->getReplaceSignal()->withAsyncRenderUrl("./gs_content.php?item={$this->hash($serialize)}");
46
47 $slate = $slate->appendOnInView($replace_signal);
48
49 return $slate;
50 }
51}
An exception for terminatinating execution or to throw for unit testing.
Interface supportsAsynchronousLoading Types, which implement this interface, can load their content a...
appendOnInView(Signal $signal)
A Signal that is triggered when the slate "comes into view", i.e.
getReplaceSignal()
Signal to replace the contents of the slate.
addAsyncLoadingCode(Slate $slate, supportsAsynchronousLoading $item)