Exponential 6 adds operators in every area: the PHP string functions (6.0.13), the role and policy checks (6.0.12), and the operators of the newer kernel features (Content Security Policy nonce, view parameters, the siteaccess menu and addresses, the environment and installation name, the transfer registry, Smarty and Twig rendering). Older operators that the 4.x reference never described have their own pages now as well.
| Operator
| Summary
|
| append
|
Returns the input array with appended elements.
|
| array
|
Creates and returns a new array.
|
| array_sum
|
Returns the sum of all elements in an array.
|
| begins_with
|
Checks if an array starts with a specific element/sequence.
|
| compare
|
Compares the contents of two arrays.
|
| contains
|
Checks if an array contains a specific element.
|
| ends_with
|
Checks if an array ends with a specific element or sequence.
|
| explode
|
Splits the input array and returns it as an array of sub-arrays.
|
| extract
|
Returns a portion of the input array.
|
| extract_left
|
Returns a portion of the start of the input array.
|
| extract_right
|
Returns a portion of the end of the input array.
|
| hash
|
Creates and returns a new associative array (a hash).
|
| implode
|
Joins array elements with strings.
|
| insert
|
Inserts an element/sequence at specified position in an array.
|
| merge
|
Merges input and passed arrays into one array.
|
| prepend
|
Returns the input array prepended with specified elements.
|
| remove
|
Returns the input array without some of the original elements.
|
| repeat
|
Returns a repeated version of the input array.
|
| replace
|
Replaces elements in an array.
|
| reverse
|
Returns a reversed version of the input array.
|
| unique
|
Returns the input array without duplicate elements.
|
| Operator
| Summary
|
| and
|
Evaluates all parameters to check if any are evaluated as FALSE
|
| choose
|
Returns one of the parameters (pinpointed by the input parameter).
|
| cond
|
Returns the value of the first clause who's condition is TRUE.
|
| eq
|
Returns TRUE if the input equals the first parameter or if all parameters are equal.
|
| false
|
Creates and returns a boolean FALSE.
|
| first_set
|
Returns the first parameter that is set (or FALSE).
|
| ge
|
Returns TRUE if a parameter is greater than or equal to another parameter.
|
| gt
|
Returns TRUE if a parameter is greater than another parameter.
|
| le
|
Returns TRUE if a parameter is less than or equal to another parameter.
|
| lt
|
Returns TRUE if a parameter is less than another parameter.
|
| ne
|
Returns TRUE if one or more of the parameters do not match.
|
| not
|
Returns the opposite of the input or the first parameter (TRUE/FALSE).
|
| null
|
Returns TRUE if the input value is NULL (not the same as 0).
|
| or
|
Evaluates all parameters until one is found to be TRUE, returns that value.
|
| true
|
Creates and returns a boolean TRUE.
|
| Operator
| Summary
|
| abs
|
Returns a positive value of either the input or the first parameter.
|
| ceil
|
Returns the next highest integer value of input or parameter.
|
| dec
|
Returns input or parameter decremented by one.
|
| div
|
Divides input or first parameter by the remaining parameters.
|
| floor
|
Returns the next lowest integer value of input or parameter.
|
| inc
|
Increments either the input or the first parameter with one.
|
| max
|
Returns the largest value of all parameters.
|
| min
|
Returns the smallest value of all parameters.
|
| mod
|
Returns the modulo of two parameters.
|
| mul
|
Multiplies all parameters and returns the result.
|
| rand
|
Returns a random integer.
|
| round
|
Returns a rounded version of the input or a parameter value.
|
| sub
|
Subtracts all remaining parameters from the first parameter.
|
| sum
|
Returns the sum of all parameters.
|
| Operator
| Summary
|
| append
|
Returns the input string with a custom sequence appended to it.
|
| autolink
|
Returns the input string with the addresses replaced by link tags.
|
| begins_with
|
Checks if a string starts with a specific character/sequence.
|
| break
|
Returns the input string with all newlines converted to HTML breaks.
|
| chr
|
Generates a string based on the input array of ASCII/UNICODE values.
|
| compare
|
Compares the contents of two strings.
|
| concat
|
Merges several strings into one string.
|
| contains
|
Checks if a string contains a specific element.
|
| count_chars
|
Returns the length of the input string.
|
| count_words
|
Returns the number of words that make up the input string.
|
| crc32
|
Returns the CRC32 polynomial of the input string.
|
| downcase
|
Returns a lowercased version of the input string.
|
| ends_with
|
Checks if a string ends with a specific character/sequence.
|
| explode
|
Splits the input string and returns it as an array of strings.
|
| extract
|
Returns a portion of the input string.
|
| extract_left
|
Returns a portion of the start of the input string.
|
| extract_right
|
Returns a portion of the end of the input string.
|
| indent
|
Returns an indented version of the input string.
|
| insert
|
Returns the input string with additional text inserted at a specified position.
|
| md5
|
Returns the MD5 hash of the input string.
|
| nl2br
|
Returns the input string with all newlines converted to HTML breaks.
|
| ord
|
Returns an array containing the ASCII/UNICODE values of the input string.
|
| pad
|
Returns a lengthened version of the input string.
|
| prepend
|
Returns the input string prepended with a custom sequence.
|
| remove
|
Returns a pruned version of the input string.
|
| repeat
|
Returns a repeated version of the input string.
|
| replace
|
Replaces elements in a string.
|
| reverse
|
Returns a reversed version of the input string.
|
| rot13
|
Returns a ROT13 transformation of the input string.
|
| shorten
|
Returns a shortened version of the input string.
|
| simpletags
|
Returns a partially marked up version of the input string.
|
| simplify
|
Returns a simplified version of the input string.
|
| trim
|
Returns a stripped version of the input string.
|
| upcase
|
Returns a capitalized version of the input string.
|
| upfirst
|
Returns the input string with a capitalized initial letter.
|
| upword
|
Returns the input string with capitalized initial letters.
|
| wash
|
Returns an HTML-safe version of the input string.
|
| wordtoimage
|
Returns the input string with embedded image tags.
|
| wrap
|
Returns a wrapped version of the input string.
|
| Operator
| Summary
|
| count
|
Returns the count of the input parameter.
|
| float
|
Converts the input parameter to a float.
|
| get_class
|
Returns the class name of an object.
|
| get_type
|
Returns the type of the provided variable.
|
| int
|
Converts the input parameter to an integer.
|
| is_array
|
Returns TRUE if the provided variable is an array.
|
| is_boolean
|
Returns TRUE if the provided variable is a boolean.
|
| is_class
|
Returns TRUE if an object is an instance of a specific class.
|
| is_float
|
Returns TRUE if the provided variable is a float.
|
| is_integer
|
Returns TRUE if the provided variable is an integer.
|
| is_null
|
Returns TRUE if the provided variable is NULL.
|
| is_numeric
|
Returns TRUE if the provided variable is a number.
|
| is_object
|
Returns TRUE if the target variable is an object.
|
| is_set
|
Returns TRUE if the value of the provided variable is set.
|
| is_string
|
Returns TRUE if the provided variable is a string.
|
| is_unset
|
Returns TRUE if the provided variable is not set (has no value).
|
The operators that arrived in the 6.0.x releases, by category. Each name links to its page.
By release: 6.0.12: 7; 6.0.13: 60; 6.0.15 (in development): 20.
| Name
| Description
| Since
|
| audit_label
|
The readable, translated label of an audit event name.
|
6.0.15 (in development)
|
| csp_nonce
|
The Content Security Policy nonce of this request, for an inline script.
|
6.0.15 (in development)
|
| exp_demo_mode
|
True while the installation runs in demo mode.
|
6.0.15 (in development)
|
| exp_environment
|
The name of the environment (EXP_ENV in config.env.php).
|
6.0.15 (in development)
|
| exp_environment_badge
|
The environment badge of this request (level and label), from site.ini [AdminEnvironment].
|
6.0.15 (in development)
|
| exp_smarty_render
|
Renders a Smarty template (.stpl) with the template variables of the current namespace.
|
6.0.15 (in development)
|
| exp_twig_render
|
Renders a Twig template (.twig) with the template variables of the current namespace.
|
6.0.15 (in development)
|
| expinfo
|
Metadata of the installation and its extensions (versions, what is active, which operators exist).
|
6.0.15 (in development)
|
| installation_name
|
The name of the installation (empty on production with hide_on_prod).
|
6.0.15 (in development)
|
| is_production_system
|
True when the installation is a production system.
|
6.0.15 (in development)
|
| transfer_actions
|
The import and export actions of the transfer registry for a context (a container, a class ...).
|
6.0.15 (in development)
|
| transfer_related
|
The tools a "Looking for ...?" box offers next to a transfer tool.
|
6.0.15 (in development)
|
| transfer_tool
|
One tool of the transfer registry, or false.
|
6.0.15 (in development)
|
| transfer_tools
|
The import and export tools of the transfer registry the current user may use, filtered.
|
6.0.15 (in development)
|
| view_parameter
|
A value encoded as the value of a view parameter, /(name)/<value>.
|
6.0.15 (in development)
|
| Name
| Description
| Since
|
| addcslashes
|
PHP addcslashes(): backslashes before the given characters.
|
6.0.13
|
| addslashes
|
PHP addslashes(): backslashes before quotes, backslash and NUL.
|
6.0.13
|
| bin2hex
|
PHP bin2hex(): the hexadecimal form of the text.
|
6.0.13
|
| chunk_split
|
PHP chunk_split(): the text split into chunks of a given length.
|
6.0.13
|
| convert_uudecode
|
PHP convert_uudecode(): decodes a uuencoded text.
|
6.0.13
|
| convert_uuencode
|
PHP convert_uuencode(): uuencodes the text.
|
6.0.13
|
| hebrev
|
PHP hebrev(): logical Hebrew text to visual text.
|
6.0.13
|
| hex2bin
|
PHP hex2bin(): the text of a hexadecimal string (false for invalid input).
|
6.0.13
|
| html_entity_decode
|
PHP html_entity_decode(): HTML entities back to characters.
|
6.0.13
|
| htmlentities
|
PHP htmlentities(): every character that has an HTML entity, as that entity.
|
6.0.13
|
| htmlspecialchars_decode
|
PHP htmlspecialchars_decode(): the special HTML entities back to characters.
|
6.0.13
|
| lcfirst
|
PHP lcfirst(): the first character in lower case.
|
6.0.13
|
| levenshtein
|
PHP levenshtein(): the edit distance between two texts.
|
6.0.13
|
| ltrim
|
PHP ltrim(): the text without white space (or given characters) at the start.
|
6.0.13
|
| metaphone
|
PHP metaphone(): the metaphone key of the text.
|
6.0.13
|
| number_format
|
PHP number_format(): a number with grouped thousands and given decimals.
|
6.0.13
|
| quoted_printable_decode
|
PHP quoted_printable_decode(): decodes a quoted-printable text.
|
6.0.13
|
| quoted_printable_encode
|
PHP quoted_printable_encode(): the text as quoted-printable.
|
6.0.13
|
| quotemeta
|
PHP quotemeta(): backslashes before the regular expression meta characters.
|
6.0.13
|
| rawurldecode
|
PHP rawurldecode(): decodes an RFC 3986 encoded text.
|
6.0.15 (in development)
|
| rawurlencode
|
PHP rawurlencode(): the text encoded as RFC 3986 (a space is %20), for path segments.
|
6.0.15 (in development)
|
| ristring
|
Replaces text, case-sensitive (PHP str_replace).
|
6.0.13
|
| rstring
|
Replaces text, case-insensitive (PHP str_ireplace).
|
6.0.13
|
| rtrim
|
PHP rtrim(): the text without white space (or given characters) at the end.
|
6.0.13
|
| similar_text
|
PHP similar_text(): the number of matching characters of two texts.
|
6.0.13
|
| soundex
|
PHP soundex(): the soundex key of the text.
|
6.0.13
|
| sprintf
|
PHP sprintf(): the input as the format, the parameters as its values.
|
6.0.13
|
| str_contains
|
PHP str_contains(): true when the text contains the needle.
|
6.0.13
|
| str_ends_with
|
PHP str_ends_with(): true when the text ends with the needle.
|
6.0.13
|
| str_getcsv
|
PHP str_getcsv(): a CSV line as an array.
|
6.0.13
|
| str_shuffle
|
PHP str_shuffle(): the characters of the text in random order.
|
6.0.13
|
| str_split
|
PHP str_split(): the text as an array of chunks.
|
6.0.13
|
| str_starts_with
|
PHP str_starts_with(): true when the text starts with the needle.
|
6.0.13
|
| str_word_count
|
PHP str_word_count(): the number of words, or the words as an array.
|
6.0.13
|
| strcasecmp
|
PHP strcasecmp(): compares two texts, case-insensitive.
|
6.0.13
|
| strcmp
|
PHP strcmp(): compares two texts.
|
6.0.13
|
| strcoll
|
PHP strcoll(): compares two texts by the current locale.
|
6.0.13
|
| strcspn
|
PHP strcspn(): the length of the start that has none of the given characters.
|
6.0.13
|
| strip_tags
|
PHP strip_tags(): the text without HTML and PHP tags.
|
6.0.13
|
| stripcslashes
|
PHP stripcslashes(): undoes addcslashes.
|
6.0.13
|
| stripos
|
PHP stripos(): the position of the first occurrence, case-insensitive (false if none).
|
6.0.13
|
| stripslashes
|
PHP stripslashes(): undoes addslashes.
|
6.0.13
|
| stristr
|
PHP stristr(): the text from the first occurrence of the needle on, case-insensitive.
|
6.0.13
|
| strlen
|
PHP strlen(): the length of the text in bytes.
|
6.0.13
|
| strnatcasecmp
|
PHP strnatcasecmp(): compares two texts in natural order, case-insensitive.
|
6.0.13
|
| strnatcmp
|
PHP strnatcmp(): compares two texts in natural order.
|
6.0.13
|
| strncasecmp
|
PHP strncasecmp(): compares the first n characters, case-insensitive.
|
6.0.13
|
| strncmp
|
PHP strncmp(): compares the first n characters.
|
6.0.13
|
| strpbrk
|
PHP strpbrk(): the text from the first of the given characters on.
|
6.0.13
|
| strpos
|
PHP strpos(): the position of the first occurrence (false if none).
|
6.0.13
|
| strrchr
|
PHP strrchr(): the text from the last occurrence of a character on.
|
6.0.13
|
| strripos
|
PHP strripos(): the position of the last occurrence, case-insensitive (false if none).
|
6.0.13
|
| strrpos
|
PHP strrpos(): the position of the last occurrence (false if none).
|
6.0.13
|
| strspn
|
PHP strspn(): the length of the start made only of the given characters.
|
6.0.13
|
| strstr
|
PHP strstr(): the text from the first occurrence of the needle on.
|
6.0.13
|
| strtok
|
PHP strtok(): the first token of the text.
|
6.0.13
|
| strtr
|
PHP strtr(): translates characters or replaces substrings.
|
6.0.13
|
| substr
|
PHP substr(): part of the text.
|
6.0.13
|
| substr_compare
|
PHP substr_compare(): compares part of the text with another text.
|
6.0.13
|
| substr_count
|
PHP substr_count(): how often the needle occurs.
|
6.0.13
|
| substr_replace
|
PHP substr_replace(): replaces part of the text.
|
6.0.13
|
| vsprintf
|
PHP vsprintf(): the input as the format, an array as its values.
|
6.0.13
|
These existed before Exponential 6 (or come from an extension, as the Since column says); the 4.x reference had no page for them.
| Name
| Description
| Since
|
| alphabet
|
The letters of the alphabet of the current locale, for alphabetical navigation.
|
older than 6.0
|
| array_append
|
Deprecated alias of append: the input array with the parameters added at the end.
|
older than 6.0
|
| array_merge
|
Deprecated alias of merge: the input array merged with the arrays given as parameters.
|
older than 6.0
|
| array_prepend
|
Deprecated alias of prepend: the input array with the parameters added at the start.
|
older than 6.0
|
| eztoc
|
A table of contents built from the headings of an XML block attribute.
|
older than 6.0
|
| fetch_alias
|
Runs a fetch alias defined in fetchalias.ini and returns its result.
|
older than 6.0
|
| getenv
|
PHP getenv(): the value of an environment variable (operator of the extension bcgooglesitemaps).
|
extension bcgooglesitemaps
|
| icon
|
The image tag of an icon of the active icon theme (as class_icon and the other icon operators).
|
older than 6.0
|
| language_switcher
|
The addresses of the current page in the other siteaccesses and languages, for a language switcher.
|
older than 6.0
|
| locale
|
The locale object (eZLocale) of the current locale, or of the locale given as parameter.
|
older than 6.0
|
| serialize
|
PHP serialize(): the value as a stored representation (operator of the extension swark).
|
extension swark
|
| unserialize
|
PHP unserialize(): the value back from its stored representation (operator of the extension swark).
|
extension swark
|
| urldecode
|
PHP urldecode(): decodes a query string value.
|
older than 6.0
|
| urlencode
|
PHP urlencode(): the text encoded for a query string (a space is +).
|
older than 6.0
|
| x18n
|
Translates a text in the translation context of an extension (i18n with the extension's name).
|
older than 6.0
|
These pages have a section "Changed in Exponential 6.0.15" with what differs in 6.x:
Added for Exponential 6.0.15 and the earlier 6.0.x releases.
Comments (5 historical)
Written by readers of the earlier documentation sites, kept as they were.
Custom template operators
Tristan Rivoallan ·
Is there a way to implement custom operators ?
Re: Custom template operators
Marc Boon ·
There is even a wizard to help you get started:
<exponential>/admin/setup/templateoperator
Don't forget to check here first if it already exists what you need:
http://ez.no/community/contribs/template_plugins
replacement operator?
Maja Rom Anjer ·
How do I do a simple replacement in a string?
Re: replacement operator?
Tiotmoun ·
Maybe with
{$str|explode(";")|implode(" ")}
to replace ";" width " "
Re: replacement operator?
Xc(Xiongjie Chen) ·
There is operator 'replace' for string, see
http://ez.no/doc/ez_publish/techn...e/template_operators/strings/replace