vendor/friendsofsymfony/ckeditor-bundle/src/DependencyInjection/Compiler/ResourceCompilerPass.php line 21

Open in your IDE?
  1. <?php
  2. /*
  3.  * This file is part of the FOSCKEditor Bundle.
  4.  *
  5.  * (c) 2018 - present  Friends of Symfony
  6.  * (c) 2009 - 2017     Eric GELOEN <[email protected]>
  7.  *
  8.  * For the full copyright and license information, please read the LICENSE
  9.  * file that was distributed with this source code.
  10.  */
  11. namespace FOS\CKEditorBundle\DependencyInjection\Compiler;
  12. use Symfony\Component\DependencyInjection\Compiler\CompilerPassInterface;
  13. use Symfony\Component\DependencyInjection\ContainerBuilder;
  14. @trigger_error(
  15.     'The '.__NAMESPACE__.'ResourceCompilerPass is deprecated since 1.x '.
  16.     'and will be removed with the 2.0 release.',
  17.     E_USER_DEPRECATED
  18. );
  19. /**
  20.  * @deprecated since 1.x and will be removed with the 2.0 release.
  21.  *
  22.  * @author GeLo <[email protected]>
  23.  */
  24. class ResourceCompilerPass implements CompilerPassInterface
  25. {
  26.     /**
  27.      * {@inheritdoc}
  28.      */
  29.     public function process(ContainerBuilder $container)
  30.     {
  31.         if ($container->hasParameter($parameter 'templating.helper.form.resources')) {
  32.             @trigger_error(
  33.                 'Using "symfony/templating" is deprecated since 1.x and will be removed with the 2.0 release. '.
  34.                 'Use "twig/twig" Instead.',
  35.                 E_USER_DEPRECATED
  36.             );
  37.             $container->setParameter(
  38.                 $parameter,
  39.                 array_merge(
  40.                     ['FOSCKEditorBundle:Form'],
  41.                     $container->getParameter($parameter)
  42.                 )
  43.             );
  44.         }
  45.         if ($container->hasParameter($parameter 'twig.form.resources')) {
  46.             $container->setParameter(
  47.                 $parameter,
  48.                 array_merge(
  49.                     ['@FOSCKEditor/Form/ckeditor_widget.html.twig'],
  50.                     $container->getParameter($parameter)
  51.                 )
  52.             );
  53.         }
  54.     }
  55. }