Elgg  Version master
Functions
external_files.php File Reference

Go to the source code of this file.

Functions

 elgg_import_esm (string $name)
 Helper functions for external files like css/js. More...
 
 elgg_register_esm (string $name, string $href)
 Registers an ES module to the import map. More...
 
 elgg_require_css (string $view)
 Register a CSS view name to be included in the HTML head. More...
 
 elgg_register_external_file (string $type, string $name, string $url, string $location= '')
 Core registration function for external files. More...
 
 elgg_unregister_external_file (string $type, string $name)
 Unregister an external file. More...
 
 elgg_load_external_file (string $type, string $name)
 Load an external resource for use on this page. More...
 
 elgg_get_loaded_external_resources (string $type, string $location)
 Get external resource descriptors. More...
 

Function Documentation

elgg_get_loaded_external_resources ( string  $type,
string  $location 
)

Get external resource descriptors.

Parameters
string$typeType of file: js or css
string$locationPage location
Returns
array
Since
4.3

Definition at line 105 of file external_files.php.

elgg_import_esm ( string  $name)

Helper functions for external files like css/js.

Request that Elgg load an ES module onto the page.

Parameters
string$nameThe ES module name
Returns
void
Since
6.0
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 15 of file external_files.php.

elgg_load_external_file ( string  $type,
string  $name 
)

Load an external resource for use on this page.

Parameters
string$typeType of file: js or css
string$nameThe identifier for the file
Returns
void
Since
1.8.0
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 92 of file external_files.php.

elgg_register_esm ( string  $name,
string  $href 
)

Registers an ES module to the import map.

Parameters
string$namename of the module
string$hreflocation where the module should be imported from
Returns
void
Since
6.0
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 29 of file external_files.php.

elgg_register_external_file ( string  $type,
string  $name,
string  $url,
string  $location = '' 
)

Core registration function for external files.

Parameters
string$typeType of external resource (js or css)
string$nameIdentifier used as key
string$urlURL
string$locationLocation in the page to include the file (default = 'footer' for js, 'head' for anything else)
Returns
bool
Since
1.8.0
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 62 of file external_files.php.

elgg_require_css ( string  $view)

Register a CSS view name to be included in the HTML head.

Parameters
string$viewThe css view name
Returns
void
Since
3.1
Examples:
/root/Elgg/engine/lib/views.php.

Definition at line 41 of file external_files.php.

elgg_unregister_external_file ( string  $type,
string  $name 
)

Unregister an external file.

Parameters
string$typeType of file: js or css
string$nameThe identifier of the file
Returns
bool
Since
1.8.0

Definition at line 79 of file external_files.php.