block.json
5 months ago
controller.php
1 year ago
index.asset.php
6 months ago
index.js
6 months ago
style-index-rtl.css
6 months ago
style-index.css
6 months ago
view.php
1 month ago
controller.php
17 lines
| 1 | <?php |
| 2 | use SureCart\Models\Blocks\ProductListBlock; |
| 3 | |
| 4 | $controller = new ProductListBlock( $block ); |
| 5 | $query = $controller->query(); |
| 6 | |
| 7 | // Set the intitial state used in SSR. |
| 8 | wp_interactivity_state( |
| 9 | 'surecart/sidebar', |
| 10 | [ |
| 11 | 'open' => $attributes['open'] ?? true, |
| 12 | ] |
| 13 | ); |
| 14 | |
| 15 | // return the view. |
| 16 | return 'file:./view.php'; |
| 17 |