In package com.eden.orchid.api.compilers

public abstract class TemplateFunction extends Object implements OptionsHolder

since: v1.0.0 public abstract

Template Functions add methods that can be called by themselves or as a "filter" in an expression within the primary template language.


String name final
Field Annotations:

boolean isSafe final
Field Annotations:

OrchidPage page
Field Annotations:


TemplateFunction(String name, boolean isSafe) public

Initialize the Function with the name which it should be called with in the template., and whether Whether this Function returns "safe" HTML that should not be escaped by default. For filters that return anything other than a String, `isSafe` should always be false. The actual implementation of a Function should have a single constructor annotated with {@link javax.inject.Inject }.

  • String name

    the name which to call this Function
  • isSafe


String parameters() abstract public

The sequential parameters of this function

Object apply() abstract public

Apply the filter or function here, returning the created or modified data.