Method

dump—  Prints information in a human-readable format about a variable.

Description

This method displays information about a variable in a way that is easier to read by humans. This is used mainly to debug variable values and print objects arrays or strings.
Minimum number of arguments for this method is one.

Structure of the method:

dump(variable)

Parameters

variable— the variable we want to get information on that can be an object or array or a string

Examples

In the example below, we get information about a variable.

Example #1

{% set lead = findOne('lead', 'id', id)%} 
{{dump(lead)}}

//Output: 
Array
(
    [id] => 27578
    [is_published] => 1
    [date_added] => 2018-04-04 13:23:42
    [created_by] => 7
    [created_by_user] => John Smith
    [date_modified] => 2018-05-30 09:10:39
    [modified_by] => 
    [modified_by_user] => DEBUG add tag to lead(90)~workflow
    [last_sms_date] => 2018-05-10 13:03:05
    [title] => Mrs
    [first_name] => John
    [last_name] => Smith
    [email] => john.smith@business.com
)

Example #2

{% set leadEmail = findOne('lead', 'id', id).email%} 
{{dump(leadEmail)}} 
//Output: john.smith@business.com

To stay updated with the latest features, news and how-to articles and videos, please join our group on Facebook, Flexie CRM Academy.