Overview

Namespaces

  • Charcoal
    • View
      • Mustache
      • Php
      • Twig

Classes

  • AssetsHelpers
  • MustacheEngine
  • MustacheLoader
  • TranslatorHelpers

Interfaces

  • HelpersInterface
  • Overview
  • Namespace
  • Class

Class AssetsHelpers

Mustache helpers for rendering CSS and JavaScript.

Charcoal\View\Mustache\AssetsHelpers implements Charcoal\View\Mustache\HelpersInterface
Namespace: Charcoal\View\Mustache
Located at Charcoal/View/Mustache/AssetsHelpers.php
Methods summary
public array
# toArray( )

Retrieve the collection of helpers.

Retrieve the collection of helpers.

Returns

array

Implementation of

Charcoal\View\Mustache\HelpersInterface::toArray()
public
# addJs( string $js, Mustache_LambdaHelper $helper = null )

Enqueue (concatenate) inline JavaScript content.

Enqueue (concatenate) inline JavaScript content.

Must include <script> surrounding element.

Parameters

$js
The JavaScript to add.
$helper
For rendering strings in the current context.
public string
# js( )

Get the saved inline JavaScript content and purge the store.

Get the saved inline JavaScript content and purge the store.

Returns

string
public
# addJsRequirement( string $js, Mustache_LambdaHelper $helper = null )

Enqueue an external JavaScript file.

Enqueue an external JavaScript file.

Must include <script> surrounding element.

Parameters

$js
The JavaScript to add.
$helper
For rendering strings in the current context.
public string
# jsRequirements( )

Get the JavaScript requirements and purge the store.

Get the JavaScript requirements and purge the store.

Returns

string
public
# addCss( string $css, Mustache_LambdaHelper $helper = null )

Enqueue (concatenate) inline CSS content.

Enqueue (concatenate) inline CSS content.

Must include <style> surrounding element.

Parameters

$css
The CSS string to add.
$helper
For rendering strings in the current context.
public string
# css( )

Get the saved inline CSS content and purge the store.

Get the saved inline CSS content and purge the store.

Returns

string
public
# addCssRequirement( string $css, Mustache_LambdaHelper $helper = null )

Enqueue an external CSS file.

Enqueue an external CSS file.

Must include <link /> or surrounding <style> element.

Parameters

$css
The CSS requirements.
$helper
For rendering strings in the current context.
public string
# cssRequirements( )

Get the CSS requirements and purge the store.

Get the CSS requirements and purge the store.

Returns

string
API documentation generated by ApiGen