|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
Inheritance diagram for LoggingJavaScriptBinding:
Collaboration diagram for LoggingJavaScriptBinding:Public Member Functions | |
| createId () | |
| Create a fresh unique id. More... | |
| addOnLoadCode ($code) | |
| getOnLoadCodeAsync () | |
| Get all the registered on-load javascript code for the async context, e.g. More... | |
| clearOnLoadCodeAsync () | |
| Clears all JavaScript code currently registered for the async context. More... | |
Public Member Functions inherited from ILIAS\UI\Implementation\Render\JavaScriptBinding | |
| createId () | |
| Create a fresh unique id. More... | |
| addOnLoadCode (string $code) | |
| Add some JavaScript-statements to the on-load handler of the page. More... | |
| getOnLoadCodeAsync () | |
| Get all the registered on-load javascript code for the async context, e.g. More... | |
| clearOnLoadCodeAsync () | |
| Clears all JavaScript code currently registered for the async context. More... | |
Data Fields | |
| array | $on_load_code = array() |
| array | $ids = array() |
Private Attributes | |
| int | $count = 0 |
| LoggingJavaScriptBinding::addOnLoadCode | ( | $code | ) |
| LoggingJavaScriptBinding::clearOnLoadCodeAsync | ( | ) |
Clears all JavaScript code currently registered for the async context.
This is necessary because rendering can register JavaScript as a side effect, even when the rendered output is not required by the current async endpoint.
This is caused by ILIAS treating controllers as independent layers, meaning a controller cannot reliably determine what has been executed before it, while each layer may contribute parts of the page. This causes unnecessary rendering and JavaScript registration. This method prevents said JavaScript from leaking into the async response.
This is a reminder that we want proper routing inside ILIAS: https://docu.ilias.de/go/wiki/wpage_8780_1357
Implements ILIAS\UI\Implementation\Render\JavaScriptBinding.
Definition at line 232 of file Base.php.
| LoggingJavaScriptBinding::createId | ( | ) |
Create a fresh unique id.
This MUST return a new id on every call.
Implements ILIAS\UI\Implementation\Render\JavaScriptBinding.
Definition at line 214 of file Base.php.
| LoggingJavaScriptBinding::getOnLoadCodeAsync | ( | ) |
Get all the registered on-load javascript code for the async context, e.g.
return all code inside <script> tags
Implements ILIAS\UI\Implementation\Render\JavaScriptBinding.
Definition at line 227 of file Base.php.
|
private |
Definition at line 212 of file Base.php.
Referenced by createId().