Search moodle.org's
Developer Documentation

See Release Notes

  • Bug fixes for general core bugs in 4.0.x will end 8 May 2023 (12 months).
  • Bug fixes for security issues in 4.0.x will end 13 November 2023 (18 months).
  • PHP version: minimum PHP 7.3.0 Note: the minimum PHP version has increased since Moodle 3.10. PHP 7.4.x is also supported.

(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.

return: string Rendered template
param: string $string

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

return: string Rendered template
param: string $string

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

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