Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 3.10.x will end 8 November 2021 (12 months).
  • Bug fixes for security issues in 3.10.x will end 9 May 2022 (18 months).
  • PHP version: minimum PHP 7.2.0 Note: minimum PHP version has increased since Moodle 3.8. PHP 7.3.x and 7.4.x are supported too.

(no description)

File Size: 76 lines (2 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 1 class

Mustache_LambdaHelper:: (4 methods):
  __construct()
  render()
  __invoke()
  withDelimiters()


Class: Mustache_LambdaHelper  - X-Ref

Mustache Lambda Helper.

Passed as the second argument to section lambdas (higher order sections),
giving them access to a `render` method for rendering a string with the
current context.
__construct(Mustache_Engine $mustache, Mustache_Context $context, $delims = null)   X-Ref
Mustache Lambda Helper constructor.

param: Mustache_Engine  $mustache Mustache engine instance
param: Mustache_Context $context  Rendering context
param: string           $delims   Optional custom delimiters, in the format `{{= <% %> =}}`. (default: null)

render($string)   X-Ref
Render a string as a Mustache template with the current rendering context.

param: string $string
return: string Rendered template

__invoke($string)   X-Ref
Render a string as a Mustache template with the current rendering context.

param: string $string
return: string Rendered template

withDelimiters($delims)   X-Ref
Get a Lambda Helper with custom delimiters.

param: string $delims Custom delimiters, in the format `{{= <% %> =}}`
return: Mustache_LambdaHelper