Pollen Solutions - Asset Component - Manage CSS styles, JS scripts, ...

v1.0.10 2022-10-14 00:00 UTC

This package is auto-updated.

Last update: 2024-05-13 12:41:50 UTC


Latest Stable Version MIT Licensed PHP Supported Versions

Pollen Solutions Asset Component provides tools to manage assets in web applications.

Allows adding of inline Css styles, adding of inline JS scripts or passing PHP vars to Js global vars to access them in your own scripts.


composer require pollen-solutions/asset

Basic Usage

use Pollen\Asset\AssetManager;

$asset = new AssetManager();

// Add inline CSS
    'body {

// Add inline JS

// Add global JS var
// -- app namespaced
$asset->addGlobalJsVar('test1', 'test-value1');

// -- in footer
$asset->addGlobalJsVar('test2', 'test-value2', true);

// -- in footer and without namespace
$asset->addGlobalJsVar('test3', 'test-value3', true, null);

Register asset


Enqueue assets


Cache and Minification

Coming soon