add doc about blocks and page maker
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
Simon Vieille 2022-03-24 16:41:12 +01:00
parent 47a80f2364
commit c221d0cbd4

View file

@ -1,6 +1,7 @@
# Page
A page is a doctrine entity that contains blocks and form builder. For each element defined in `buildForm`, you must add a getter and a setter. See the example below.
A page is a doctrine entity that contains blocks and form builder.
You can run `php bin/console make:page` and generate a new page in a interactive way.
```
// src/Entity/Page/YourPage.php
@ -74,6 +75,10 @@ core:
`App\Core\Form\Site\Page\TextareaBlockType` will render a symfony `TextareaType`.
### ChoiceBlockType
`App\Core\Form\Site\Page\ChoiceBlockType` will render a symfony `ChoiceType`.
### FileBlockType
`App\Core\Form\Site\Page\FileBlockType` will render a symfony `FileType` with a download link.
@ -89,6 +94,10 @@ public function getMyBlock(): Block
}
```
### FilePickerBlockType
`App\Core\Form\Site\Page\FilePickerBlockType` will render a specific widget that use the file manager.
### ImageBlockType
`App\Core\Form\Site\Page\ImageBlockType` will render a symfony `FileType` with a preview of the image.