ez.no / exponential / documentation / reference / template operators / variables / get_class
$input|get_class( test )
| Name | Type | Description | Required |
|---|---|---|---|
| test | any | Variable to check. | Only if input is omitted. |
String or false.
This operator simply checks and returns the class of a target variable. The operator returns the PHP classname as a string. If both input and parameter are supplied, it is the parameter that will be evaluated. If the data to be evaluated is not an object then the operator will return false. This function is a debug function, not meant to be used in template to use for any logic.
Example 1
{let my_variable="Test"} {get_class( $my_variable )} {/let}
returns false.
Example 2
{get_class( $node )}
returns the string "ezcontentobjecttreenode" as long as $node is an actual node.
log in or create a user account to comment.
Comments