Skip to content
Permalink
Browse files

[MINOR] Use latest block bundle for auto-registration of blocks (#18)

  • Loading branch information
kodiakhq committed Sep 12, 2019
2 parents 2af412d + 832e804 commit 64ece7834878ea11bad76e7d50cce91aab94662f
Showing with 2 additions and 15 deletions.
  1. +0 −12 README.md
  2. +1 −1 composer.json
  3. +1 −2 tests/Block/Service/GDPRInformationBlockServiceTest.php
@@ -41,18 +41,6 @@ return [
It is recommended to use [webpack](https://webpack.js.org/) / [webpack-encore](https://github.com/symfony/webpack-encore)
to include the `GdprPopup.js` and `GdprPopup.css` file in your page. These files are located in the `assets` folder.

### Configure the Bundle

Add the block to the `sonata_block` configuration if necessary:

```yaml
# config/packages/sonata_block.yaml
sonata_block:
blocks:
core23_gdpr.block.information: ~
```

## Usage

```twig
@@ -22,7 +22,7 @@
],
"require": {
"php": "^7.2",
"sonata-project/block-bundle": "^3.16.1",
"sonata-project/block-bundle": "^3.18",
"sonata-project/core-bundle": "^3.13.5",
"symfony/dependency-injection": "^3.4 || ^4.2",
"symfony/expression-language": "^3.4 || ^4.2",
@@ -103,8 +103,7 @@ public function testGetMetadata(): void
$metadata = $blockService->getMetadata();

static::assertSame('core23_gdpr.block.information', $metadata->getTitle());
static::assertNotNull($metadata->getImage());
static::assertStringStartsWith('data:image/png;base64,', $metadata->getImage() ?? '');
static::assertNull($metadata->getImage());
static::assertSame('Core23GDPRBundle', $metadata->getDomain());
static::assertSame([
'class' => 'fa fa-balance-scale',

0 comments on commit 64ece78

Please sign in to comment.
You can’t perform that action at this time.