vendor/kunstmaan/media-bundle/Helper/Imagine/ImagineController.php line 12

Open in your IDE?
  1. <?php
  2. namespace Kunstmaan\MediaBundle\Helper\Imagine;
  3. use Symfony\Component\HttpFoundation\Request;
  4. class ImagineController extends \Liip\ImagineBundle\Controller\ImagineController
  5. {
  6.     /**
  7.      * {@inheritdoc}
  8.      */
  9.     public function filterAction(Request $request$path$filter)
  10.     {
  11.         if ($request->query->has('originalExtension')) {
  12.             $info pathinfo($path);
  13.             $path $info['dirname'] . DIRECTORY_SEPARATOR $info['filename'] . '.' $request->query->getAlpha('originalExtension');
  14.         }
  15.         return parent::filterAction($request$path$filter);
  16.     }
  17.     /**
  18.      * {@inheritdoc}
  19.      */
  20.     public function filterRuntimeAction(Request $request$hash$path$filter)
  21.     {
  22.         if ($request->query->has('originalExtension')) {
  23.             $info pathinfo($path);
  24.             $path $info['dirname'] . DIRECTORY_SEPARATOR $info['filename'] . '.' $request->query->getAlpha('originalExtension');
  25.         }
  26.         return parent::filterRuntimeAction($request$hash$path$filter);
  27.     }
  28. }