gustavs-gutmanis / craft-symfony-dump
Symfony `dump` twig filter for Craft CMS
Installs: 2 534
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 0
Forks: 0
Open Issues: 4
Type:craft-plugin
Requires
- craftcms/cms: ^3.0.0|^4.0.0-alpha|^5.0.0
- symfony/var-dumper: ^3.4.46 || ^4.4.0 || ^5.1.0 || ^6.0.0 || ^7.0.0
This package is auto-updated.
Last update: 2024-04-19 13:25:16 UTC
README
Symfony Dump Twig Filter allows using the dump
twig filter in your craft templates for better debugging.
Requirements
This plugin requires Craft CMS 3.0.0 or later.
Installation
To install the plugin, follow these instructions.
-
Open your terminal and go to your Craft project:
cd /path/to/project
-
Then tell Composer to load the plugin:
composer require gustavs-gutmanis/craft-symfony-dump
-
In the Control Panel, go to Settings → Plugins and click the “Install” button for
Symfony Dump Twig Filter
.
Using Symfony Dump Twig Filter
Once the plugin is installed, you can use it in any of your twig templates to output debugging information.
{% set myData = { number: 1, string: 'some string', object: { property: 'this is a property', }, } %} {{ myData|dump }}
This will yield the following result in your browser:
You can use the Symfony Dump filter on any object in twig.