Elgg  Version 2.3
require_config.js.php
Go to the documentation of this file.
1 <?php
2 
3 $amdConfig = _elgg_services()->amdConfig->getConfig();
4 
5 // Deps are loaded in page/elements/foot with require([...])
6 unset($amdConfig['deps']);
7 
8 // Require is currently an Elgg shim. Convert it to a RequireJS config
9 ?>
10 // <script>
11 require = <?php echo json_encode($amdConfig, JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES); ?>;
12 
13 <?php
14 // Note we don't process the require() queue yet because it may require('elgg')
15 // and we have to load that synchronously a little later
elgg echo
Translates a string.
Definition: languages.js:48
elgg require
Throw an error if the required package isn&#39;t present.
Definition: elgglib.js:164
$amdConfig
_elgg_services(\Elgg\Di\ServiceProvider $services=null)
Get the global service provider.
Definition: autoloader.php:17