External files service.
More...
|
| __construct (protected Config $config, protected Urls $urls, protected ViewsService $views, protected SimpleCache $simpleCache, protected SystemCache $serverCache) |
| Constructor. More...
|
|
| register (string $type, string $name, string $url, string $location) |
| Core registration function for external files. More...
|
|
| unregister (string $type, string $name) |
| Unregister an external file. More...
|
|
| load (string $type, string $name) |
| Load an external resource for use on this page. More...
|
|
| getLoadedResources (string $type, string $location) |
| Get external resource descriptors. More...
|
|
| reset () |
| Unregister all files. More...
|
|
External files service.
Definition at line 17 of file ExternalFiles.php.
Constructor.
- Parameters
-
Config | $config | config |
Urls | $urls | urls service |
ViewsService | $views | views service |
SimpleCache | $simpleCache | simplecache |
SystemCache | $serverCache | server cache |
Definition at line 37 of file ExternalFiles.php.
Elgg\Assets\ExternalFiles::getLoadedResources |
( |
string |
$type, |
|
|
string |
$location |
|
) |
| |
Get external resource descriptors.
- Parameters
-
string | $type | Type of file: js or css |
string | $location | Page location |
- Returns
- string[] Resources to load
Definition at line 148 of file ExternalFiles.php.
Elgg\Assets\ExternalFiles::getSubResourceIntegrity |
( |
string |
$type, |
|
|
string |
$resource |
|
) |
| |
|
protected |
Returns the integrity related to the resource file.
- Parameters
-
string | $type | type of resource |
string | $resource | name of resource |
- Returns
- string|NULL
Definition at line 200 of file ExternalFiles.php.
Elgg\Assets\ExternalFiles::load |
( |
string |
$type, |
|
|
string |
$name |
|
) |
| |
Load an external resource for use on this page.
- Parameters
-
string | $type | Type of file: js or css |
string | $name | The identifier for the file |
- Returns
- void
Definition at line 115 of file ExternalFiles.php.
Elgg\Assets\ExternalFiles::register |
( |
string |
$type, |
|
|
string |
$name, |
|
|
string |
$url, |
|
|
string |
$location |
|
) |
| |
Core registration function for external files.
- Parameters
-
string | $type | Type of external resource (js or css) |
string | $name | Identifier used as key |
string | $url | URL |
string | $location | Location in the page to include the file |
- Returns
- bool
Definition at line 56 of file ExternalFiles.php.
Elgg\Assets\ExternalFiles::reset |
( |
| ) |
|
Elgg\Assets\ExternalFiles::setupType |
( |
string |
$type | ) |
|
|
protected |
Bootstraps the externals data structure.
- Parameters
-
string | $type | The type of external, js or css. |
- Returns
- void
Definition at line 187 of file ExternalFiles.php.
Elgg\Assets\ExternalFiles::unregister |
( |
string |
$type, |
|
|
string |
$name |
|
) |
| |
Unregister an external file.
- Parameters
-
string | $type | Type of file: js or css |
string | $name | The identifier of the file |
- Returns
- bool
Definition at line 94 of file ExternalFiles.php.
array Elgg\Assets\ExternalFiles::$files = [] |
|
protected |
Elgg\Assets\ExternalFiles::$sri |
|
protected |
The documentation for this class was generated from the following file: