diff --git a/.github/workflows/codeception.yml b/.github/workflows/codeception.yml index 88c03dcb..9bd767e5 100644 --- a/.github/workflows/codeception.yml +++ b/.github/workflows/codeception.yml @@ -11,16 +11,16 @@ jobs: env: TEST_BUNDLE_NAME: "ToolboxBundle" TEST_BUNDLE_INSTALLER_CLASS: "ToolboxBundle\\Tool\\Install" - TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/tests" + TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/lib/test-bundle/tests" TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}" PIMCORE_CODECEPTION_FRAMEWORK: "${{ github.workspace }}/pimcore-codeception-framework" - PIMCORE_CODECEPTION_VERSION: "1.0" + PIMCORE_CODECEPTION_VERSION: "2.0" - PIMCORE_ENVIRONMENT: test + APP_ENV: test PIMCORE_TEST_DB_DSN: "mysql://root:root@localhost/dachcom_bundle_test" PIMCORE_TEST_URL: "http://localhost" - PIMCORE_CLASS_DIRECTORY: "${{ github.workspace }}/tests/_output/var/classes/DataObject" + PIMCORE_CLASS_DIRECTORY: "${{ github.workspace }}/lib/test-bundle/tests/_output/var/classes/DataObject" SYMFONY_DEPRECATIONS_HELPER: "weak" PIMCORE_PHP_ERROR_REPORTING: 32767 @@ -41,33 +41,28 @@ jobs: options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 strategy: matrix: - php: [7.4] - symfony: [^4.4] - pimcore: [~6.6.0, ~6.7.0, ~6.8.0, ~6.9.0] + php: [ 8.0 ] + symfony: [ ^5.3 ] + pimcore: [ ~10.1.0 ] include: - - pimcore: ~6.6.0 - template_tag: v2.6.0 - - pimcore: ~6.7.0 - template_tag: v2.7.0 - - pimcore: ~6.8.0 - template_tag: v2.8.0 - - pimcore: ~6.8.0 - symfony: ^3.4 - php: 7.4 - template_tag: v2.8.0 - - pimcore: ~6.9.0 - template_tag: v2.8.19 + - pimcore: ~10.1.0 + template_tag: v10.1.0 steps: - uses: actions/checkout@v2 + with: + path: lib/test-bundle - name: Generate Application Structure run: | git clone -b ${{ matrix.template_tag }} --single-branch --depth 1 https://github.com/pimcore/skeleton.git - mv skeleton/app . + mv skeleton/composer.json . mv skeleton/bin . + mv skeleton/config . + mv skeleton/public . + mv skeleton/src . + mv skeleton/templates . mv skeleton/var . - mv skeleton/web . - mv skeleton/src/AppBundle src + rm -r skeleton - name: Setup Pimcore Codeception Framework env: @@ -110,7 +105,7 @@ jobs: - name: Start Webserver and Chrome run: | wget https://get.symfony.com/cli/installer -O - | bash - ~/.symfony/bin/symfony server:start --port=8080 --dir=web --force-php-discovery --allow-http --no-tls --daemon + ~/.symfony/bin/symfony server:start --port=8080 --dir=public --force-php-discovery --allow-http --no-tls --daemon - name: Get Composer Cache Directory id: composer-cache @@ -135,17 +130,17 @@ jobs: - name: Assets Install run: | - bin/console assets:install web --relative --symlink + bin/console assets:install public --relative --symlink - name: Tests run: | bin/console cache:warmup --env=test - vendor/bin/codecept run --env github -c ${{ env.GITHUB_WORKSPACE }} + vendor/bin/codecept run --env github -c ${{ github.workspace }}/lib/test-bundle - name: Log Output uses: actions/upload-artifact@v2 if: failure() with: name: "Logs (PHP ${{ matrix.php }}, Pimcore ${{ matrix.pimcore }}, Symfony ${{ matrix.symfony }})" - path: tests/_output/ + path: ${{ github.workspace }}/lib/test-bundle/tests/_output/ if-no-files-found: ignore diff --git a/.github/workflows/ecs.yml b/.github/workflows/ecs.yml index 1d7e0e42..0e1e1b3e 100644 --- a/.github/workflows/ecs.yml +++ b/.github/workflows/ecs.yml @@ -11,13 +11,13 @@ jobs: env: TEST_BUNDLE_NAME: "ToolboxBundle" TEST_BUNDLE_INSTALLER_CLASS: "ToolboxBundle\\Tool\\Install" - TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/tests" + TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/lib/test-bundle/tests" TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}" PIMCORE_CODECEPTION_FRAMEWORK: "${{ github.workspace }}/pimcore-codeception-framework" - PIMCORE_CODECEPTION_VERSION: "1.0" + PIMCORE_CODECEPTION_VERSION: "2.0" - PIMCORE_ENVIRONMENT: test + APP_ENV: test PIMCORE_TEST_DB_DSN: "mysql://root:root@localhost/dachcom_bundle_test" PIMCORE_TEST_URL: "http://localhost" @@ -40,24 +40,28 @@ jobs: options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 strategy: matrix: - php: [7.4] - symfony: [^4.4] - pimcore: [^6.8] + php: [ 8.0 ] + symfony: [ ^5.3 ] + pimcore: [ ~10.1.0 ] include: - - pimcore: ^6.8 - template_tag: v2.8.0 - + - pimcore: ~10.1.0 + template_tag: v10.1.0 steps: - uses: actions/checkout@v2 + with: + path: lib/test-bundle - name: Generate Application Structure run: | git clone -b ${{ matrix.template_tag }} --single-branch --depth 1 https://github.com/pimcore/skeleton.git - mv skeleton/app . + mv skeleton/composer.json . mv skeleton/bin . + mv skeleton/config . + mv skeleton/public . + mv skeleton/src . + mv skeleton/templates . mv skeleton/var . - mv skeleton/web . - mv skeleton/src/AppBundle src + rm -r skeleton - name: Setup Pimcore Codeception Framework env: @@ -116,10 +120,10 @@ jobs: - name: Assets Install run: | - bin/console assets:install web --relative --symlink + bin/console assets:install public --relative --symlink - name: Easy Coding Standard Check continue-on-error: true run: | bin/console cache:warmup --env=test - vendor/bin/ecs check src/ToolboxBundle --config easy-coding-standard.yml \ No newline at end of file + vendor/bin/ecs check ${{ github.workspace }}/lib/test-bundle/src/ToolboxBundle --config ${{ github.workspace }}/lib/test-bundle/ecs.php \ No newline at end of file diff --git a/.github/workflows/php-stan.yml b/.github/workflows/php-stan.yml index 21df6b78..88587b6a 100644 --- a/.github/workflows/php-stan.yml +++ b/.github/workflows/php-stan.yml @@ -11,13 +11,13 @@ jobs: env: TEST_BUNDLE_NAME: "ToolboxBundle" TEST_BUNDLE_INSTALLER_CLASS: "ToolboxBundle\\Tool\\Install" - TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/tests" + TEST_BUNDLE_TEST_DIR: "${{ github.workspace }}/lib/test-bundle/tests" TEST_PROJECT_ROOT_DIR: "${{ github.workspace }}" PIMCORE_CODECEPTION_FRAMEWORK: "${{ github.workspace }}/pimcore-codeception-framework" - PIMCORE_CODECEPTION_VERSION: "1.0" + PIMCORE_CODECEPTION_VERSION: "2.0" - PIMCORE_ENVIRONMENT: test + APP_ENV: test PIMCORE_TEST_DB_DSN: "mysql://root:root@localhost/dachcom_bundle_test" PIMCORE_TEST_URL: "http://localhost" @@ -40,23 +40,28 @@ jobs: options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 strategy: matrix: - php: [7.4] - symfony: [^4.4] - pimcore: [^6.8] + php: [ 8.0 ] + symfony: [ ^5.3 ] + pimcore: [ ~10.1.0 ] include: - - pimcore: ^6.8 - template_tag: v2.8.0 + - pimcore: ~10.1.0 + template_tag: v10.1.0 steps: - uses: actions/checkout@v2 + with: + path: lib/test-bundle - name: Generate Application Structure run: | git clone -b ${{ matrix.template_tag }} --single-branch --depth 1 https://github.com/pimcore/skeleton.git - mv skeleton/app . + mv skeleton/composer.json . mv skeleton/bin . + mv skeleton/config . + mv skeleton/public . + mv skeleton/src . + mv skeleton/templates . mv skeleton/var . - mv skeleton/web . - mv skeleton/src/AppBundle src + rm -r skeleton - name: Setup Pimcore Codeception Framework env: @@ -115,9 +120,9 @@ jobs: - name: Assets Install run: | - bin/console assets:install web --relative --symlink + bin/console assets:install public --relative --symlink - name: Php Stan run: | bin/console cache:warmup --env=test - vendor/bin/phpstan analyse -c phpstan.neon -a tests/_phpstan-bootstrap.php src -l 2 \ No newline at end of file + vendor/bin/phpstan analyse -c ${{ github.workspace }}/lib/test-bundle/phpstan.neon -a ${{ github.workspace }}/lib/test-bundle/tests/_phpstan-bootstrap.php ${{ github.workspace }}/lib/test-bundle/src -l 4 \ No newline at end of file diff --git a/README.md b/README.md index ce32790b..35a72329 100644 --- a/README.md +++ b/README.md @@ -6,51 +6,40 @@ The Toolbox is a Kickstarter for your every day project. It provides some import [![Software License](https://img.shields.io/badge/license-GPLv3-brightgreen.svg?style=flat-square)](LICENSE.md) [![Latest Release](https://img.shields.io/packagist/v/dachcom-digital/toolbox.svg?style=flat-square)](https://packagist.org/packages/dachcom-digital/toolbox) [![Tests](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-toolbox/Codeception?style=flat-square&logo=github&label=codeception)](https://github.com/dachcom-digital/pimcore-toolbox/actions?query=workflow%3A%22Codeception%22) -[![PhpStan](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-toolbox/PHP%20Stan?style=flat-square&logo=github&label=phpstan%20level%202)](https://github.com/dachcom-digital/pimcore-toolbox/actions?query=workflow%3A%22PHP%20Stan%22) +[![PhpStan](https://img.shields.io/github/workflow/status/dachcom-digital/pimcore-toolbox/PHP%20Stan?style=flat-square&logo=github&label=phpstan%20level%204)](https://github.com/dachcom-digital/pimcore-toolbox/actions?query=workflow%3A%22PHP%20Stan%22) + +![Pimcore Toolbox](https://user-images.githubusercontent.com/700119/135613598-a9ef2c69-9a44-41cd-8542-596a0322d3da.png) -![pimcore-toolbox](https://user-images.githubusercontent.com/700119/27372271-541e6106-5664-11e7-9159-7f4aefa26cb6.png) ### Release Plan | Release | Supported Pimcore Versions | Supported Symfony Versions | Release Date | Maintained | Branch | |---------|-----------------------------------|----------------------------|--------------|----------------|------------| -| **3.x** | `6.0` - `6.9` | `3.4`, `^4.4` | 16.07.2019 | Feature Branch | 3.x | -| **2.8** | `5.4`, `5.5`, `5.6`, `5.7`, `5.8` | `3.4` | 30.06.2019 | Bugfix only | 2.8 | +| **4.x** | `10.1` | `5.3` | 01.10.2021 | Feature Branch | dev-master | +| **3.x** | `6.0` - `6.9` | `3.4`, `^4.4` | 16.07.2019 | Unsupported | 3.x | +| **2.8** | `5.4`, `5.5`, `5.6`, `5.7`, `5.8` | `3.4` | 30.06.2019 | Unsupported | 2.8 | | **1.8** | `4.0` | -- | 28.04.2017 | Unsupported | pimcore4 | ### Installation ```json "require" : { - "dachcom-digital/toolbox" : "~3.3.0" + "dachcom-digital/toolbox" : "~4.0.0" } ``` -### Installation via Extension Manager -After you have installed the Toolbox Bundle via composer, open pimcore backend and go to `Tools` => `Extension`: -- Click the green `+` Button in `Enable / Disable` row -- Click the green `+` Button in `Install/Uninstall` row +### Installation +- Execute: `$ bin/console pimcore:bundle:enable ToolboxBundle` +- Execute: `$ bin/console pimcore:bundle:install ToolboxBundle` ## Upgrading - -### Upgrading via Extension Manager -After you have updated the Toolbox Bundle via composer, open pimcore backend and go to `Tools` => `Extension`: -- Click the green `+` Button in `Update` row - -### Upgrading via CommandLine -After you have updated the Toolbox Bundle via composer: -- Execute: `$ bin/console pimcore:bundle:update ToolboxBundle` - -### Migrate via CommandLine -Does actually the same as the update command and preferred in CI-Workflow: -- Execute: `$ bin/console pimcore:migrations:migrate -b ToolboxBundle` +- Execute: `$ bin/console doctrine:migrations:version --add --all --prefix 'ToolboxBundle\Migrations'` ## What's the meaning of Toolbox? - create often used bricks in a second - extend, override toolbox bricks - add config elements via yml configuration - add consistent and beautiful config elements -- implement conditions to your config (for example: display a dropdown in config window if another checkbox has been checked) - add your custom bricks while using the toolbox config environment - removes the default `pimcore_area_*` element wrapper from each brick @@ -95,7 +84,6 @@ The Toolbox provides a lot of [ready-to-use Bricks](docs/11_ElementsOverview.md) - [Code Style](docs/1_CodeStyle.md) - [Helper Commands](docs/2_Commands.md) - [Toolbox Elements Overview](docs/11_ElementsOverview.md) -- [Conditional Logic in Configuration](docs/12_ConditionalLogic.md) - [CK-Editor Configuration](docs/13_CkEditor.md) - [Image Thumbnails Strategy](docs/14_ImageThumbnails.md) - [Configuration Context](docs/15_Context.md) diff --git a/UPGRADE.md b/UPGRADE.md index 41b2acab..f92ea41f 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1,52 +1,38 @@ # Upgrade Notes -![upgrade](https://user-images.githubusercontent.com/700119/31535145-3c01a264-affa-11e7-8d86-f04c33571f65.png) +## Migrating from Version 3.x to Version 4.0.0 +⚠️ If you're still on version `2.x`, you need to install `3.x` first, then [migrate](https://github.com/dachcom-digital/pimcore-toolbox/blob/3.x/UPGRADE.md) to `3.3`. After that, you're able to update to `^4.0`. + +### Global Changes +- All deprecations have been removed: + - Legacy Service Alias `toolbox.area.brick.base_brick` has been removed + - Config Node `toolbar.x`, `toolbar.y`, `toolbar.xAlign`, `toolbar.yAlign`, `toolbar.title` has been removed + - Config Node `area_block_configuration.controlsAlign`, `area_block_configuration.controlsTrigger` has added + - Config Node `disallowed_subareas`: `areas_appearance` + - Config Node `disallowed_content_snippet_areas`: `snippet_areas_appearance` + - Config Node `ToolboxBundle\Calculator\*`: `column_calculator|slide_calculator` + - ⚠️ Element `pimcore_dynamiclink` has been removed: If you're still using this element in your project, you need to [migrate](https://github.com/dachcom-digital/pimcore-toolbox/blob/3.x/docs/70_ConfigurationFlags.md#-use_dynamic_links-flag) to pimcore_link first (via TB 3.x)! +- All Folders in `views` are lowercase/dashed now (`areas/google-map`, `areas/iframe`, `areas/link-list`, `areas/paralax-container`, `areas/slide-columns`, `toolbox/bootstrap4`, ...) + +### Editable Changes +- Instead of `pimcore.area.brick` you need to use the `toolbox.area.brick` tag to register your brick. Also remove `setAreaBrickType` call from your service definition +- Always use `$info->setParam(key, value)` instead of `$info->setParams()`, otherwise you'll overwrite given parameters from the toolbox abstract brick +- Remove `{{ elementConfigBar|raw }}` in your templates +- Conditional Logic feature for editable has been removed +- Reload property in node `config.reload` has been removed. Use `config_parameter.reload_on_close: true` instead +- Custom view has been removed, TB is now using the pimcore defaults dialog box configuration + - Config Node `col_class` (In`[BRICKNAME].config_elements.[ELEMENT]` has been removed + +### Type Changes +- `StoreProviderInterface::getValues():array` needs to return an array (return type declaration added) +- `ContextResolverInterface::getCurrentContextIdentifier():?string` needs to return null|string (return type declaration added) + +### New Features +- ⚠️ [Editable Permissions](https://github.com/dachcom-digital/pimcore-toolbox/issues/161) have been added. Non-Admin Users will **NOT** be able to add editables until you enabled specific permissions for them! +- Google Maps Improved: + - Only call API if address has changed + - Better Error Reporting: Display some notes (only in editmode), if something went wrong during API call +- Simple Area Brick: Create a simple editable without creating any php classes. Read more about it [here](./docs/10_CustomBricks.md#simple-brick)) *** -After every update you should check the pimcore extension manager. -Just click the "update" button or execute the migration command to finish the bundle update. - -#### Update from Version 3.2.5 to Version 3.3.0 -- **[NEW FEATURE]**: Pimcore 6.9.0 ready -- **[IMPROVEMENT]**: use no-cookie domain for youtube videos [@ghettopro](https://github.com/dachcom-digital/pimcore-toolbox/pull/153) -- **[BUG FIX]**: Fix invalid asset video markup [@gpalmisano](https://github.com/dachcom-digital/pimcore-toolbox/pull/154) -- **[BUG FIX]**: Fix google maps locations with single quotes [#151](https://github.com/dachcom-digital/pimcore-toolbox/issues/151) -- **[BUG FIX]**: Fix wrong container parameter concatenation [#150](https://github.com/dachcom-digital/pimcore-toolbox/issues/150) - -#### Update from Version 3.2.4 to Version 3.2.5 -- **[BUG FIX]**: Fix column adjuster column_store availability check - -#### Update from Version 3.2.3 to Version 3.2.4 -- **[IMPROVEMENT]**: Assert correct order in download listing when members join is active - -#### Update from Version 3.2.2 to Version 3.2.3 -- **[NEW FEATURE]**: Pimcore 6.8.0 ready -- **[BUGFIX]**: Use `config` property on Pimcore >= 6.8 [#146](https://github.com/dachcom-digital/pimcore-toolbox/issues/146) - -#### Update from Version 3.2.1 to Version 3.2.2 -- **[NEW FEATURE]** : UIkit3 theme added [@AndiKeiser](https://github.com/dachcom-digital/pimcore-toolbox/pull/138) - -#### Update from Version 3.2.0 to Version 3.2.1 -- **[NEW FEATURE]**: Pimcore 6.6.0 ready -- **[NEW FEATURE]** : Fix rendering of multiple t-col-half elements [@christopher-siegel](https://github.com/dachcom-digital/pimcore-toolbox/pull/135) - -#### Update from Version 3.1.x to Version 3.2.0 -- **[NEW FEATURE]**: Pimcore 6.4.0 and Pimcore 6.5.0 ready -- **[NEW FEATURE]**: Store Provider added (https://github.com/dachcom-digital/pimcore-toolbox/pull/128) -- **[IMPROVEMENT]**: Better Google API Key Fetching: Introduces `toolbox.google_maps.browser_api_key` and `toolbox.google_maps.simple_api_key`. Read more about it [here](./docs/11_ElementsOverview.md#google-map) -- **[BUG FIX]**: Video Autoplay Fix (https://github.com/dachcom-digital/pimcore-toolbox/issues/129) - -#### Update from Version 3.x to Version 3.1.0 -- **[NEW FEATURE]**: Pimcore 6.3.0 ready -- **[BUG FIX]**: [Fix wrong index in bootstrap tabs for active element](https://github.com/dachcom-digital/pimcore-toolbox/issues/119) - -*** - -#### Update from Version 2.x to Version 3.0.0 -- **[NEW FEATURE]**: Pimcore 6.0.0 ready -- **[BC BREAK]**: All Controllers are registered as services now! -- **[ATTENTION]**: All `href`, `multihref` elements has been replaced by `relation`, `relations` - -*** - -Toolbox 2.x Upgrade Notes: https://github.com/dachcom-digital/pimcore-toolbox/blob/2.8/UPGRADE.md +Toolbox 3.x Upgrade Notes: https://github.com/dachcom-digital/pimcore-toolbox/blob/3.x/UPGRADE.md diff --git a/composer.json b/composer.json index c6e5373e..63063e9e 100755 --- a/composer.json +++ b/composer.json @@ -2,7 +2,7 @@ "name": "dachcom-digital/toolbox", "type": "pimcore-bundle", "license": "GPL-3.0-or-later", - "description": "Pimcore Project Kickstarter.", + "description": "Pimcore X Project Kickstarter", "keywords": ["pimcore", "toolbox"], "homepage": "https://github.com/dachcom-digital/pimcore-toolbox", "authors": [ @@ -21,10 +21,7 @@ "autoload-dev": { "psr-4": { "": "src/" - }, - "classmap": [ - "app/TestKernel.php" - ] + } }, "extra": { "pimcore": { @@ -34,15 +31,14 @@ } }, "require": { - "pimcore/pimcore": "^6.0" + "pimcore/pimcore": "^10.1" }, "require-dev": { - "codeception/codeception": "~2.4.0", + "codeception/codeception": "^4.1", + "codeception/module-webdriver": "^1.4", + "codeception/module-symfony": "^1.6", "phpstan/phpstan": "^0.12", "phpstan/phpstan-symfony": "^0.12", - "symplify/easy-coding-standard": "^5.4" - }, - "conflict": { - "symfony/monolog-bundle": "3.6.0" + "symplify/easy-coding-standard": "^9.0" } } diff --git a/docs/0_Usage.md b/docs/0_Usage.md index 44c76439..be34938f 100644 --- a/docs/0_Usage.md +++ b/docs/0_Usage.md @@ -27,11 +27,11 @@ Of course, you're able to extend/modify the toolbar configuration: ```yaml area_block_configuration: toolbar: - title: 'Your Toolbar Title' width: 200 - x: 10 - y: 125 buttonWidth: 200 + buttonMaxCharacters: 40 + controlsAlign: 'top' + controlsTrigger: 'hover' # define custom groups. Note: The "toolbox" group will be generated automatically. groups: @@ -50,7 +50,7 @@ Use the `snippet_areas_appearance` config node to disable bricks in specific sn ```yaml # define which elements should not appear in snippet documents toolbox: - disallowed_content_snippet_areas: + snippet_areas_appearance: snippet_c: disallowed: - parallaxContainer diff --git a/docs/10_CustomBricks.md b/docs/10_CustomBricks.md index bd264e47..eba414d6 100644 --- a/docs/10_CustomBricks.md +++ b/docs/10_CustomBricks.md @@ -1,26 +1,25 @@ # Custom Bricks -There are three simple steps to create a custom Brick with a Toolbox context. +If you want to have full control about your area brick, create a [default brick](./10_CustomBricks.md#default-brick). +If you just want to create a simple brick, create a [simple brick](./10_CustomBricks.md#simple-brick). With simple bricks you don't have to create any php classes at all but. -1. Add this configuration to `/app/config/pimcore/config.yml`: +- [Default Brick](./10_CustomBricks.md#default-brick) +- [Simple Brick](./10_CustomBricks.md#simple-brick) +- [Bricks without Editables (No Config Dialog)](./10_CustomBricks.md#bricks-without-editables-no-config-dialog) +- [Bricks with tabbed config dialog](./10_CustomBricks.md#tabbed-config-dialog) -> **Tip:** Add this to a separate config file. +## Default Brick + +There are three simple steps to create a custom brick: + +1. Add this configuration to `/config/packages/toolbox.yml`: -### Code Style -> **Important!** Don't use dashes in your area name! Always use Camel- or Snake Case! -> Example: Instead of `my-brick` you need to define your custom area as `my_brick` or `myBrick`. -> Since it's symfony standard, we recommend to use the underscore strategy! - ```yaml -# It's always a good idea to add your brick as a service. services: - AppBundle\Document\Areabrick\MyBrick\MyBrick: + App\Document\Areabrick\MyBrick\MyBrick: parent: ToolboxBundle\Document\Areabrick\AbstractAreabrick - calls: - # set the brick type to external - - [setAreaBrickType, ['external']] tags: - - { name: pimcore.area.brick, id: my_brick } + - { name: toolbox.area.brick, id: my_brick } toolbox: custom_areas: @@ -30,82 +29,186 @@ toolbox: title1: type: input title: That's a Title - col_class: t-col-half description: Lorem Ipsum # default config for input - # see: https://www.pimcore.org/docs/5.0.0/Documents/Editables/Input.html#page_Configuration + # see: https://pimcore.com/docs/pimcore/10.0/Development_Documentation/Documents/Editables/Input.html#page_Configuration config: ~ title2: type: input title: That's also a Title - col_class: t-col-half description: Lorem Ipsum config: ~ ``` -2. Add the Area Class to `AppBundle/Document/Areabrick/MyBrick/MyBrick.php`: +2. Add the area class to `App/Document/Areabrick/MyBrick/MyBrick.php`: ```php getTemplateDirectoryName(), $this->getTemplateSuffix()); + } + + public function getName():string { return 'My Brick'; } - public function getDescription() + public function getDescription():string { return 'My Brick'; } - public function getIcon() + public function getIcon():string { - return '/static/areas/my_brick/icon.svg'; + return '/static/areas/my-brick/icon.svg'; } } ``` -3. Add the view to `/app/Resources/views/Areas/my_brick/view.html.twig`: +3. Add the view to `/templates/areas/my-brick/view.html.twig`: ```twig -{{ elementConfigBar|raw }} -
{{ pimcore_input('title2').getData() }}
+{{ pimcore_input('title2').data }}