Quiq::Html::Resources - CSS- und JavaScript-Resourcen einer Webapplikation
Quiq::Hash
Ein Objekt der Klasse ist ein Speicher für die Definition von CSS- und JavaScript-Ressourcen. Die Ressourcen werden unter einem Schlüssel $key, z.B. 'jquery' oder 'jquery-ui', im Speicher abgelegt und nach ihrem Typ (css, js) unterschieden.
use Quiq::Html::Resources; # Instantiiere Objekt (hier am Beispiel der Resourcen 'jquery' # und 'jquery-ui') my $res = Quiq::Html::Resources->new( jquery => { js => [ 'https://code.jquery.com/jquery-latest.min.js', ], }, 'jquery-ui' => { css => [ 'https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css', ], js => [ 'https://code.jquery.com/ui/1.12.1/jquery-ui.min.js', ], }, ); my @cssResources = $res->resources('jquery-ui','css'); # ('https://code.jquery.com/ui/1.12.1/themes/base/jquery-ui.css') my @jsResources = $res->resources('jquery-ui','js'); # ('https://code.jquery.com/ui/1.12.1/jquery-ui.css')
$res = $class->new($key=>\%typeArr,...);
Instantiiere ein Objekt der Klasse und liefere eine Referenz auf dieses Objekt zurück.
@arr | $arr = $res->resources(@keys);
Liste von Schlüsseln, z.B. 'jquery', 'datatables'.
Liefere die Liste der Ressourcen zu den Schlüsseln @keys.
1.204
Frank Seitz, http://fseitz.de/
Copyright (C) 2022 Frank Seitz
This code is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Quiq, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Quiq
CPAN shell
perl -MCPAN -e shell install Quiq
For more information on module installation, please visit the detailed CPAN module installation guide.