generated from Sylius/PluginSkeleton
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
9cec5ea
commit e9911d9
Showing
27 changed files
with
205 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
## Examples: | ||
|
||
Examples for rendering pages with blocks depending on the response from sulu are included in `tests` directory: | ||
|
||
- `tests/Behat/ApiResponseMock` - Mocked sulu responses | ||
- `tests/Application/src/Renderer/Block` Block renderers | ||
- `tests/Application/templates/bundles/BitBagSyliusSuluPlugin/shop/block` -> Templates for blocks | ||
- `tests/Application/src/Renderer/Page` Page renderers | ||
- `tests/Application/templates/bundles/BitBagSyliusSuluPlugin/shop/page` -> Templates for blocks | ||
- `tests/Application/config/services_test.yaml` -> Manual service declarations | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,11 @@ | ||
## Twig functions | ||
Plugins provide a few twig functions which allows to render blocks and pages. | ||
|
||
1.Twig extensions methods: | ||
Plugins provide a few twig functions which allows to render blocks and pages. All of them are listed below: | ||
|
||
```php | ||
'bitbag_get_sulu_page(pageUrl)' -> Fetch the page with the specified url from sulu. | ||
'bitbag_render_sulu_page(pageUrl)' -> Render the page. It is using the strategy abstraction for rendering. | ||
'bitbag_render_sulu_blocks(blocks)' -> Render all passed blocks. You can use it when you are sure that you dont need any other html tags. | ||
'bitbag_render_sulu_blocks_with_type' -> Render blocks with specified type. You can pass a string (or html) which will be added between blocks and at the end | ||
'bitbag_render_sulu_block_with_type' -> Render one specified block. If is more then one, then only first is rendered | ||
'bitbag_render_sulu_blocks_with_type(blocks, type)' -> Render blocks with specified type. You can pass a string (or html) which will be added between blocks and at the end | ||
'bitbag_render_sulu_block_with_type(blocks, type)' -> Render one specified block. If is more then one, then only first is rendered | ||
'bitbag_page_has_sulu_block(pageUrl, blockType)' -> Check if sulu page contains a block with specified type. | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.