1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-06 06:38:00 +02:00

Provides the ability to use variant for e107::library(load).

This commit is contained in:
Lóna Lore
2016-06-25 08:36:22 +02:00
parent d412e7cf75
commit fa7cee16af

View File

@@ -1707,13 +1707,19 @@ class e107
* - 'load': Loads a library.
* @param string $library
* The name of the library to detect/load.
* @param string $variant
* (Optional for 'load') The name of the variant to load. Note that only one variant of a library can be loaded
* within a single request. The variant that has been passed first is used; different variant names in subsequent
* calls are ignored.
*
* @return array|boolean
* - In case of 'detect': An associative array containing registered information for the library specified by
* $name, or FALSE if the library $name is not registered.
* - In case of 'load': An associative array of the library information.
* - In case of 'info': An associative array containing registered information for all libraries, the registered
* information for the library specified by $name, or FALSE if the library $name is not registered.
*/
public static function library($action = '', $library = null)
public static function library($action = '', $library = null, $variant = null)
{
$libraryHandler = e107::getLibrary();
@@ -1724,7 +1730,7 @@ class e107
break;
case 'load':
return $libraryHandler->load($library);
return $libraryHandler->load($library, $variant);
break;
case 'info':