2022-05-17 15:16:51 +00:00
|
|
|
{
|
|
|
|
"definitions": [
|
|
|
|
{
|
|
|
|
"dd": "Converts string to lowercase",
|
|
|
|
"dt": "lower"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Converts string to uppercase",
|
|
|
|
"dt": "upper"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Counts the words in a string",
|
|
|
|
"dt": "wordcount"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Capitalizes the first letter, lowercase the rest",
|
|
|
|
"dt": "capitalize"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Takes two strings as arguments, replaces the first with the second",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "replace(from=\"\", to=\"\")"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Escapes quoted strings",
|
|
|
|
"dt": "addslashes"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Provides a slug for the string",
|
|
|
|
"dt": "slugify"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Capitalizes each word in the string",
|
|
|
|
"dt": "title"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Removes leading and trailing whitespace",
|
|
|
|
"dt": "trim"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Removes leading whitespace",
|
|
|
|
"dt": "trim_start"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Removes trailing whitespace",
|
|
|
|
"dt": "trim_end"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Removes leading characters that match a pattern",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "trim_start_matches(pat=\"\")"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Removes trailing characters that match a pattern",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "trim_end_matches(pat=\"\")"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Truncates the string to the length specified",
|
|
|
|
"dt": "truncate"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Replaces line breaks (\\n or \\r\\n) with HTML line breaks (<br>)",
|
|
|
|
"dt": "linebreaksbr"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Remove space ( ) and line breaks (\\n or \\r\\n) between HTML tags",
|
|
|
|
"dt": "spaceless"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Tries to remove HTML tags from input",
|
|
|
|
"dt": "striptags"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Returns the first element of an array",
|
|
|
|
"dt": "first"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Returns the last element of an array",
|
|
|
|
"dt": "last"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Returns the nth element of an array",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "nth(n=2)"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Joins an array with a delimeter",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "join(sep=\"\")"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Returns the length of an array, an object, or a string",
|
|
|
|
"dt": "length"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Returns a reversed string or array",
|
|
|
|
"dt": "reverse"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Sorts an array into ascending order. You can sort objects by providing a fieldname argument",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "sort(attribute=\"fieldname.subname\")"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Removes duplicate items from an array. You can filter objects by providing a fieldname argument",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "unique(attribute=\"fieldname\")"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Slices an array by the given start and end parameter",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "slice(start=n, end=m)"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Groups an array using the required attribute argument",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "group_by(attribute=\"fieldname\")"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Filters the array values, returning objects whose attribute is equal to the argument",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "filter(attribute=\"fieldname\", value=\"value\")"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Retrieves an attribute from each object in an array",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "map(attribute=\"fieldname\")"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Appends values to an array",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "concat(with=otherarray)"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Performs classic (%-based) URL encoding",
|
|
|
|
"dt": "urlencode"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Encodes URLs, including any slashes",
|
|
|
|
"dt": "urlencode_strict"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Can return an alternative text if the argument is greater than one",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "pluralize(singular=\"y\", plural=\"ies\")"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Returns a number rounded",
|
|
|
|
"dt": "round"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Generates human-readable sizes for integers",
|
|
|
|
"dt": "filesizeformat"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Parses a timestamp into a date(time) string",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "date(format=\"%Y-%m-%d\")"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Escapes a string's HTML",
|
|
|
|
"dt": "escape"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Escapes XML special characters",
|
|
|
|
"dt": "escape_xml"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Marks a variable as safe: HTML will not be escaped",
|
|
|
|
"dt": "safe"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Accesses a value from an object when the key is not a valid identifier.",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "get(key=\"posts/content\")"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Splits a string into an array of strings, separated by a pattern.",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "split(pat=\"\")"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Converts a value into an integer.",
|
|
|
|
"dt": "int"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Converts a value into a float.",
|
|
|
|
"dt": "float"
|
|
|
|
},
|
|
|
|
{
|
2022-05-20 01:22:51 +00:00
|
|
|
"dd": "Transforms a value into its JSON representation. Argument is optional.",
|
|
|
|
"dt": "json_encode(pretty=true)"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Returns a string representation of the value.",
|
|
|
|
"dt": "as_str"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Provides a default value if the name is not present in the context",
|
2022-05-20 01:22:51 +00:00
|
|
|
"dt": "default(value=1)"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
2022-05-20 01:22:51 +00:00
|
|
|
"dd": "Converts the variable contents from markdown to HTML. Argument is optional.",
|
|
|
|
"dt": "markdown(inline=true)"
|
2022-05-17 15:16:51 +00:00
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Encode the variable to base64",
|
|
|
|
"dt": "base64_encode"
|
|
|
|
},
|
|
|
|
{
|
|
|
|
"dd": "Decode the variable from base64",
|
|
|
|
"dt": "base64_decode"
|
|
|
|
},
|
|
|
|
{
|
2022-05-20 01:22:51 +00:00
|
|
|
"dd": "Format a number into its string representation. Argument is optional.",
|
|
|
|
"dt": "num_format(locale=\"\")"
|
2022-05-17 15:16:51 +00:00
|
|
|
}
|
|
|
|
]
|
|
|
|
}
|