Archive for : March, 2015

View array content in twig

The dump function dumps information about a template variable. It can be used as an alternative to var_dump or print_r from php. This is mostly useful to debug a template that does not behave as expected by introspecting its variables:

{{ dump(var_name) }}

Read entire article at: Twig -> Functions -> dump

Linux – chown directory for multiple users

Create a new group for users (run commands with root rights):

groupadd testgroup
gpasswd -a user1 testgroup
gpasswd -a user2 testgroup
gpasswd -a user3 testgroup

Make that group the group owner of the directory (with root rights):

chown -R user1:testgroup /your/directory

Make the group writeable (with root rights):

chmod -R g+w /your/directory