Elgg  Version 2.3
Public Member Functions | Protected Member Functions | List of all members
Elgg\Assets\ExternalFiles Class Reference

Public Member Functions

 __construct (\stdClass $config=null)
 Constructor. More...
 
 register ($type, $name, $url, $location, $priority=500)
 Core registration function for external files. More...
 
 unregister ($type, $name)
 Unregister an external file. More...
 
 load ($type, $name)
 Load an external resource for use on this page. More...
 
 getLoadedFiles ($type, $location)
 Get external resource descriptors. More...
 

Protected Member Functions

 bootstrap ($type)
 Bootstraps the externals data structure in $_ELGG. More...
 

Detailed Description

Definition at line 14 of file ExternalFiles.php.

Constructor & Destructor Documentation

Elgg\Assets\ExternalFiles::__construct ( \stdClass  $config = null)

Constructor.

Parameters
\stdClass$configPredefined configuration in format used by global $CONFIG variable

Definition at line 27 of file ExternalFiles.php.

Member Function Documentation

Elgg\Assets\ExternalFiles::bootstrap (   $type)
protected

Bootstraps the externals data structure in $_ELGG.

Parameters
string$typeThe type of external, js or css.
Returns
null

Definition at line 186 of file ExternalFiles.php.

Elgg\Assets\ExternalFiles::getLoadedFiles (   $type,
  $location 
)

Get external resource descriptors.

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

Definition at line 157 of file ExternalFiles.php.

Elgg\Assets\ExternalFiles::load (   $type,
  $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

Definition at line 126 of file ExternalFiles.php.

Elgg\Assets\ExternalFiles::register (   $type,
  $name,
  $url,
  $location,
  $priority = 500 
)

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
int$priorityLoading priority of the file
Returns
bool

Definition at line 45 of file ExternalFiles.php.

Elgg\Assets\ExternalFiles::unregister (   $type,
  $name 
)

Unregister an external file.

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

Definition at line 103 of file ExternalFiles.php.


The documentation for this class was generated from the following file: