Search moodle.org's
Developer Documentation

See Release Notes
Long Term Support Release

  • Bug fixes for general core bugs in 4.1.x will end 13 November 2023 (12 months).
  • Bug fixes for security issues in 4.1.x will end 10 November 2025 (36 months).
  • PHP version: minimum PHP 7.4.0 Note: minimum PHP version has increased since Moodle 4.0. PHP 8.0.x is 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