Assets manager for css and js inclusions in templates.
More...
|
static | start (&$config) |
| Starts the assets manager.
|
|
static | setAssetsFolder ($assetsFolder='/assets/') |
|
static | getUrl ($resource, $absolute=false) |
| Returns the absolute or relative url to the resource.
|
|
static | getActiveThemeUrl ($resource, $absolute=false) |
| Returns the absolute or relative url for a resource in the activeTheme.
|
|
static | getThemeUrl ($theme, $resource, $absolute=false) |
| Returns the absolute or relative url for a resource in a theme.
|
|
static | js ($resource, $attributes=[], $absolute=false) |
| Returns the script inclusion for a javascript resource.
|
|
static | css ($resource, $attributes=[], $absolute=false) |
| Returns the css inclusion for a stylesheet resource.
|
|
static | img ($src, $attributes=[], $absolute=false) |
| Returns the image tag for inclusion.
|
|
static | js_ ($resource, $attributes=[], $absolute=false) |
| Returns the script inclusion for a javascript resource in activeTheme.
|
|
static | css_ ($resource, $attributes=[], $absolute=false) |
| Returns the css inclusion for a stylesheet resource in activeTheme.
|
|
static | img_ ($src, $attributes=[], $absolute=false) |
| Returns the image tag for inclusion in activeTheme.
|
|
|
static | gString ($template, $variable, $attributes=[]) |
|
static | script ($src, $attributes=[]) |
|
static | stylesheet ($link, $attributes=[]) |
|
static | image ($src, $attributes=[]) |
|
Assets manager for css and js inclusions in templates.
Ubiquity\assets$AssetsManager This class is part of Ubiquity
- Author
- jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
- Version
- 1.0.3
- Since
- Ubiquity 2.1.0
Definition at line 21 of file AssetsManager.php.
◆ css()
static css |
( |
|
$resource, |
|
|
|
$attributes = [] , |
|
|
|
$absolute = false |
|
) |
| |
|
static |
Returns the css inclusion for a stylesheet resource.
- Parameters
-
string | $resource | The css resource to include |
array | $attributes | The other html attributes of the script element |
boolean | $absolute | True if url must be absolute (containing siteUrl) |
- Returns
- string
Definition at line 123 of file AssetsManager.php.
◆ css_()
static css_ |
( |
|
$resource, |
|
|
|
$attributes = [] , |
|
|
|
$absolute = false |
|
) |
| |
|
static |
Returns the css inclusion for a stylesheet resource in activeTheme.
- Parameters
-
string | $resource | The css resource to include |
array | $attributes | The other html attributes of the script element |
boolean | $absolute | True if url must be absolute (containing siteUrl) |
- Returns
- string
Definition at line 159 of file AssetsManager.php.
◆ getActiveThemeUrl()
static getActiveThemeUrl |
( |
|
$resource, |
|
|
|
$absolute = false |
|
) |
| |
|
static |
Returns the absolute or relative url for a resource in the activeTheme.
- Parameters
-
string | $resource | |
boolean | $absolute | |
- Returns
- string
Definition at line 83 of file AssetsManager.php.
◆ getThemeUrl()
static getThemeUrl |
( |
|
$theme, |
|
|
|
$resource, |
|
|
|
$absolute = false |
|
) |
| |
|
static |
Returns the absolute or relative url for a resource in a theme.
- Parameters
-
string | $theme | |
string | $resource | |
boolean | $absolute | |
- Returns
- string
Definition at line 96 of file AssetsManager.php.
◆ getUrl()
static getUrl |
( |
|
$resource, |
|
|
|
$absolute = false |
|
) |
| |
|
static |
Returns the absolute or relative url to the resource.
- Parameters
-
string | $resource | |
boolean | $absolute | |
- Returns
- string
Definition at line 66 of file AssetsManager.php.
◆ gString()
static gString |
( |
|
$template, |
|
|
|
$variable, |
|
|
|
$attributes = [] |
|
) |
| |
|
staticprivate |
◆ image()
static image |
( |
|
$src, |
|
|
|
$attributes = [] |
|
) |
| |
|
staticprivate |
◆ img()
static img |
( |
|
$src, |
|
|
|
$attributes = [] , |
|
|
|
$absolute = false |
|
) |
| |
|
static |
Returns the image tag for inclusion.
- Parameters
-
string | $src | The base path to the image |
array | $attributes | The other html attributes of the image element |
boolean | $absolute | True if url must be absolute (containing siteUrl) |
- Returns
- string
Definition at line 135 of file AssetsManager.php.
◆ img_()
static img_ |
( |
|
$src, |
|
|
|
$attributes = [] , |
|
|
|
$absolute = false |
|
) |
| |
|
static |
Returns the image tag for inclusion in activeTheme.
- Parameters
-
string | $src | The base path to the image |
array | $attributes | The other html attributes of the image element |
boolean | $absolute | True if url must be absolute (containing siteUrl) |
- Returns
- string
Definition at line 171 of file AssetsManager.php.
◆ js()
static js |
( |
|
$resource, |
|
|
|
$attributes = [] , |
|
|
|
$absolute = false |
|
) |
| |
|
static |
Returns the script inclusion for a javascript resource.
- Parameters
-
string | $resource | The javascript resource to include |
array | $attributes | The other html attributes of the script element |
boolean | $absolute | True if url must be absolute (containing siteUrl) |
- Returns
- string
Definition at line 111 of file AssetsManager.php.
◆ js_()
static js_ |
( |
|
$resource, |
|
|
|
$attributes = [] , |
|
|
|
$absolute = false |
|
) |
| |
|
static |
Returns the script inclusion for a javascript resource in activeTheme.
- Parameters
-
string | $resource | The javascript resource to include |
array | $attributes | The other html attributes of the script element |
boolean | $absolute | True if url must be absolute (containing siteUrl) |
- Returns
- string
Definition at line 147 of file AssetsManager.php.
◆ script()
static script |
( |
|
$src, |
|
|
|
$attributes = [] |
|
) |
| |
|
staticprivate |
◆ setAssetsFolder()
static setAssetsFolder |
( |
|
$assetsFolder = '/assets/' | ) |
|
|
static |
◆ start()
static start |
( |
& |
$config | ) |
|
|
static |
Starts the assets manager.
Essential to define the siteURL part
- Parameters
-
Definition at line 50 of file AssetsManager.php.
◆ stylesheet()
static stylesheet |
( |
|
$link, |
|
|
|
$attributes = [] |
|
) |
| |
|
staticprivate |
◆ $assetsFolder
$assetsFolder = '/assets/' |
|
staticprivate |
◆ $siteURL
The documentation for this class was generated from the following file:
- C:/Users/myadd/Documents/GitHub/ubiquity-doc-api/vendor/phpmv/ubiquity/src/Ubiquity/assets/AssetsManager.php