Lines Matching refs:foo

81     {{ foo.bar }}
82 {{ foo['bar'] }}
90 {# equivalent to the non-working foo.data-foo #}
91 {{ attribute(foo, 'data-foo') }}
105 For convenience's sake ``foo.bar`` does the following things on the PHP
108 * check if ``foo`` is an array and ``bar`` a valid element;
109 * if not, and if ``foo`` is an object, check that ``bar`` is a valid property;
110 * if not, and if ``foo`` is an object, check that ``bar`` is a valid method
112 * if not, and if ``foo`` is an object, check that ``getBar`` is a valid method;
113 * if not, and if ``foo`` is an object, check that ``isBar`` is a valid method;
116 ``foo['bar']`` on the other hand only works with PHP arrays:
118 * check if ``foo`` is an array and ``bar`` a valid element;
143 {% set foo = 'foo' %}
144 {% set foo = [1, 2] %}
145 {% set foo = {'foo': 'bar'} %}
599 * ``["foo", "bar"]``: Arrays are defined by a sequence of expressions
602 * ``{"foo": "bar"}``: Hashes are defined by a list of keys and values
608 { 'foo': 'foo', 'bar': 'bar' }
611 { foo: 'foo', bar: 'bar' }
614 { 2: 'foo', 4: 'bar' }
617 {% set foo = 'foo' %}
618 { (foo): 'foo', (1 + 1): 'bar', (foo ~ 'b'): 'baz' }
630 {% set foo = [1, {"foo": "bar"}] %}
811 {{ foo ? 'yes' : 'no' }}
814 {{ foo ?: 'no' }} is the same as {{ foo ? foo : 'no' }}
815 {{ foo ? 'yes' }} is the same as {{ foo ? 'yes' : '' }}
821 {# returns the value of foo if it is defined and not null, 'no' otherwise #}
822 {{ foo ?? 'no' }}
836 {{ "foo #{bar} baz" }}
837 {{ "foo #{1 + 2} baz" }}
857 <strong>foo bar</strong>
861 {# output will be <div><strong>foo bar</strong></div> #}