mirror of
https://github.com/grocy/grocy.git
synced 2025-08-20 04:12:59 +00:00
Load all frontend packages conditionally
This commit is contained in:
@@ -253,3 +253,12 @@ function string_ends_with($haystack, $needle)
|
||||
|
||||
return (substr($haystack, -$length) === $needle);
|
||||
}
|
||||
|
||||
global $GROCY_REQUIRED_FRONTEND_PACKAGES;
|
||||
$GROCY_REQUIRED_FRONTEND_PACKAGES = [];
|
||||
function require_frontend_packages(array $packages)
|
||||
{
|
||||
global $GROCY_REQUIRED_FRONTEND_PACKAGES;
|
||||
|
||||
$GROCY_REQUIRED_FRONTEND_PACKAGES = array_unique(array_merge($GROCY_REQUIRED_FRONTEND_PACKAGES, $packages));
|
||||
}
|
||||
|
Reference in New Issue
Block a user