Skip to content

Commit

Permalink
Fix Twig compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
alterphp committed Mar 29, 2020
1 parent 81d604b commit fe8ab04
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/Twig/EasyAdminExtensionTwigExtension.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use EasyCorp\Bundle\EasyAdminBundle\Configuration\ConfigManager as EntityConfigManager;
use Symfony\Component\HttpFoundation\Request;
use Symfony\Component\Routing\RouterInterface;
use Twig\Environment;
use Twig\Extension\AbstractExtension;
use Twig\TwigFunction;

Expand Down Expand Up @@ -37,7 +38,7 @@ public function getFunctions()
}

public function getActionsForItem(
\Twig_Environment $twig, string $view, string $objectType, string $objectName
Environment $twig, string $view, string $objectType, string $objectName
) {
if ('document' === $objectType && $twig->getFunction('easyadmin_mongo_odm_get_actions_for_*_item')) {
$function = $twig->getFunction('easyadmin_mongo_odm_get_actions_for_*_item');
Expand All @@ -49,7 +50,7 @@ public function getActionsForItem(
}

public function renderObjectField(
\Twig_Environment $twig, string $view, string $objectType, string $objectName, $item, array $fieldMetadata
Environment $twig, string $view, string $objectType, string $objectName, $item, array $fieldMetadata
) {
if ('document' === $objectType && $twig->getFunction('easyadmin_mongo_odm_render_field_for_*_view')) {
$function = $twig->getFunction('easyadmin_mongo_odm_render_field_for_*_view');
Expand Down

0 comments on commit fe8ab04

Please sign in to comment.