Skip to content

Commit

Permalink
add validateBlock too so block can be created
Browse files Browse the repository at this point in the history
  • Loading branch information
haivala committed Apr 6, 2020
1 parent 030f041 commit 4be6b0f
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Block/GalleryBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
use Sonata\BlockBundle\Model\BlockInterface;
use Sonata\Doctrine\Model\ManagerInterface;
use Sonata\Form\Type\ImmutableArrayType;
use Sonata\Form\Validator\ErrorElement;
use Sonata\MediaBundle\Model\GalleryInterface;
use Sonata\MediaBundle\Model\MediaInterface;
use Sonata\MediaBundle\Provider\Pool;
Expand Down Expand Up @@ -201,6 +202,10 @@ public function buildEditForm(FormMapper $formMapper, BlockInterface $block)
]);
}

public function validateBlock(ErrorElement $errorElement, BlockInterface $block)
{
}

/**
* {@inheritdoc}
*/
Expand Down
5 changes: 5 additions & 0 deletions src/Block/GalleryListBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use Sonata\BlockBundle\Meta\Metadata;
use Sonata\BlockBundle\Model\BlockInterface;
use Sonata\Form\Type\ImmutableArrayType;
use Sonata\Form\Validator\ErrorElement;
use Sonata\MediaBundle\Model\GalleryManagerInterface;
use Sonata\MediaBundle\Provider\Pool;
use Symfony\Bundle\FrameworkBundle\Templating\EngineInterface;
Expand Down Expand Up @@ -127,6 +128,10 @@ public function buildEditForm(FormMapper $formMapper, BlockInterface $block)
]);
}

public function validateBlock(ErrorElement $errorElement, BlockInterface $block)
{
}

/**
* {@inheritdoc}
*/
Expand Down
5 changes: 5 additions & 0 deletions src/Block/MediaBlockService.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
use Sonata\BlockBundle\Model\BlockInterface;
use Sonata\Doctrine\Model\ManagerInterface;
use Sonata\Form\Type\ImmutableArrayType;
use Sonata\Form\Validator\ErrorElement;
use Sonata\MediaBundle\Admin\BaseMediaAdmin;
use Sonata\MediaBundle\Model\MediaInterface;
use Sonata\MediaBundle\Provider\Pool;
Expand Down Expand Up @@ -156,6 +157,10 @@ public function buildEditForm(FormMapper $formMapper, BlockInterface $block)
]);
}

public function validateBlock(ErrorElement $errorElement, BlockInterface $block)
{
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit 4be6b0f

Please sign in to comment.