vendor/sonata-project/block-bundle/src/Block/Service/AbstractAdminBlockService.php line 25

Open in your IDE?
  1. <?php
  2. declare(strict_types=1);
  3. /*
  4.  * This file is part of the Sonata Project package.
  5.  *
  6.  * (c) Thomas Rabaix <thomas.rabaix@sonata-project.org>
  7.  *
  8.  * For the full copyright and license information, please view the LICENSE
  9.  * file that was distributed with this source code.
  10.  */
  11. namespace Sonata\BlockBundle\Block\Service;
  12. use Sonata\AdminBundle\Form\FormMapper;
  13. use Sonata\BlockBundle\Meta\Metadata;
  14. use Sonata\BlockBundle\Model\BlockInterface;
  15. use Sonata\CoreBundle\Validator\ErrorElement;
  16. use Symfony\Component\Templating\EngineInterface;
  17. @trigger_error(
  18.     'The '.__NAMESPACE__.'\AbstractAdminBlockService class is deprecated since sonata-project/block-bundle 3.16 '.
  19.     'and will be removed with the 4.0 release.',
  20.     E_USER_DEPRECATED
  21. );
  22. /**
  23.  * @author Christian Gripp <mail@core23.de>
  24.  *
  25.  * @deprecated since sonata-project/block-bundle 3.16 without any replacement
  26.  */
  27. abstract class AbstractAdminBlockService extends AbstractBlockService implements AdminBlockServiceInterface
  28. {
  29.     /**
  30.      * @param string $name
  31.      */
  32.     public function __construct($nameEngineInterface $templating)
  33.     {
  34.         parent::__construct($name$templating);
  35.     }
  36.     public function buildCreateForm(FormMapper $formMapperBlockInterface $block)
  37.     {
  38.         $this->buildEditForm($formMapper$block);
  39.     }
  40.     public function prePersist(BlockInterface $block)
  41.     {
  42.     }
  43.     public function postPersist(BlockInterface $block)
  44.     {
  45.     }
  46.     public function preUpdate(BlockInterface $block)
  47.     {
  48.     }
  49.     public function postUpdate(BlockInterface $block)
  50.     {
  51.     }
  52.     public function preRemove(BlockInterface $block)
  53.     {
  54.     }
  55.     public function postRemove(BlockInterface $block)
  56.     {
  57.     }
  58.     public function buildEditForm(FormMapper $formBlockInterface $block)
  59.     {
  60.     }
  61.     public function validateBlock(ErrorElement $errorElementBlockInterface $block)
  62.     {
  63.     }
  64.     public function getBlockMetadata($code null)
  65.     {
  66.         return new Metadata($this->getName(), (null !== $code $code $this->getName()), false'SonataBlockBundle', ['class' => 'fa fa-file']);
  67.     }
  68. }