Loader#
NAME#
Kernel::Output::HTML::Layout::Loader - CSS/JavaScript
DESCRIPTION#
All valid functions.
PUBLIC INTERFACE#
LoaderCreateAgentCSSCalls()#
Generate the minified CSS files and the tags referencing them, taking a list from the Loader::Agent::CommonCSS config item.
$LayoutObject->LoaderCreateAgentCSSCalls(
Skin => 'MySkin', # optional, if not provided skin is the configured by default
);
LoaderCreateAgentJSCalls()#
Generate the minified JavaScript files and the tags referencing them, taking a list from the Loader::Agent::CommonJS config item.
$LayoutObject->LoaderCreateAgentJSCalls();
LoaderCreateJavaScriptTemplateData()#
Generate a minified file for the template data that needs to be present on the client side for JavaScript based templates.
$LayoutObject->LoaderCreateJavaScriptTemplateData();
LoaderCreateJavaScriptTranslationData()#
Generate a minified file for the translation data that needs to be present on the client side for JavaScript based translations.
$LayoutObject->LoaderCreateJavaScriptTranslationData();
LoaderCreateCustomerCSSCalls()#
Generate the minified CSS files and the tags referencing them, taking a list from the Loader::Customer::CommonCSS config item.
$LayoutObject->LoaderCreateCustomerCSSCalls();
LoaderCreateCustomerJSCalls()#
Generate the minified JavaScript files and the tags referencing them, taking a list from the Loader::Customer::CommonJS config item.
$LayoutObject->LoaderCreateCustomerJSCalls();
SkinValidate()#
Returns 1 if skin is available for Agent or Customer frontends and 0 if not.
my $SkinIsValid = $LayoutObject->SkinValidate(
UserType => 'Agent' # Agent or Customer,
Skin => 'ExampleSkin',
);
LoaderCreateDynamicCSS()#
Creates CSS string from CSS modules and adds it to HTMLHead.tt.
my $Success = $LayoutObject->LoaderCreateDynamicCSS();
CSS Result:
.StateID-1 {
background: #50B5FF;
}
.StateID-2 {
background: #3DD598;
}
.StateID-3 {
background: #FC5A5A;
}
.StateID-4 {
background: #FFC542;
}
.StateID-5 {
background: #8D8D9B;
}
.StateID-6 {
background: #FF8A25;
}
.StateID-7 {
background: #3DD598;
}
.StateID-8 {
background: #FC5A5A;
}
.StateID-9 {
background: #8D8D9B;
}
Returns:
my $Success = 1;