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

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. @trigger_error(
  17.     'The '.__NAMESPACE__.'\AbstractAdminBlockService class is deprecated since sonata-project/block-bundle 3.16 '.
  18.     'and will be removed with the 4.0 release.',
  19.     E_USER_DEPRECATED
  20. );
  21. /**
  22.  * @author Christian Gripp <mail@core23.de>
  23.  *
  24.  * @deprecated since sonata-project/block-bundle 3.16 without any replacement
  25.  */
  26. abstract class AbstractAdminBlockService extends AbstractBlockService implements AdminBlockServiceInterface
  27. {
  28.     public function buildCreateForm(FormMapper $formMapperBlockInterface $block)
  29.     {
  30.         $this->buildEditForm($formMapper$block);
  31.     }
  32.     public function prePersist(BlockInterface $block)
  33.     {
  34.     }
  35.     public function postPersist(BlockInterface $block)
  36.     {
  37.     }
  38.     public function preUpdate(BlockInterface $block)
  39.     {
  40.     }
  41.     public function postUpdate(BlockInterface $block)
  42.     {
  43.     }
  44.     public function preRemove(BlockInterface $block)
  45.     {
  46.     }
  47.     public function postRemove(BlockInterface $block)
  48.     {
  49.     }
  50.     public function buildEditForm(FormMapper $formBlockInterface $block)
  51.     {
  52.     }
  53.     public function validateBlock(ErrorElement $errorElementBlockInterface $block)
  54.     {
  55.     }
  56.     public function getBlockMetadata($code null)
  57.     {
  58.         return new Metadata($this->getName(), (null !== $code $code $this->getName()), false'SonataBlockBundle', ['class' => 'fa fa-file']);
  59.     }
  60. }