Skip to content
This repository has been archived by the owner on Feb 10, 2021. It is now read-only.

Commit

Permalink
added option to return dump
Browse files Browse the repository at this point in the history
  • Loading branch information
ddnetters committed Apr 13, 2017
1 parent 3eb44ea commit 509ddc8
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/KintPlugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,10 @@ public function getFilters()
public function getFunctions()
{
return [
new \Twig_SimpleFunction( 'd', function ($p) {return d($p);},['is_safe' => ['html']]),
new \Twig_SimpleFunction( 'ddd', function ($p) {return ddd($p);},['is_safe' => ['html']]),
new \Twig_SimpleFunction( 's', function ($p) {return s($p);},['is_safe' => ['html']]),
new \Twig_SimpleFunction( 'sd', function ($p) {return sd($p);},['is_safe' => ['html']]),
new \Twig_SimpleFunction( 'd', function ($p, $return = false) {return $return ? @d($p) : d($p);},['is_safe' => ['html']]),
new \Twig_SimpleFunction( 'ddd', function ($p, $return = false) {return $return ? @ddd($p) : ddd($p);},['is_safe' => ['html']]),
new \Twig_SimpleFunction( 's', function ($p, $return = false) {return $return ? @s($p) : s($p);},['is_safe' => ['html']]),
new \Twig_SimpleFunction( 'sd', function ($p, $return = false) {return $return ? @sd($p) : sd($p);},['is_safe' => ['html']]),
];
}

Expand Down

0 comments on commit 509ddc8

Please sign in to comment.