block.json
1 year ago
controller.php
1 year ago
index.asset.php
1 month ago
index.js
1 month ago
style-index-rtl.css
1 year ago
style-index.css
1 year ago
view.php
1 year ago
controller.php
19 lines
| 1 | <?php |
| 2 | // Get the arrows and label show/hide from context. |
| 3 | |
| 4 | $pagination_arrow = $block->context['paginationArrow'] ?? ''; |
| 5 | $show_label = $block->context['showLabel'] ?? true; |
| 6 | |
| 7 | // Map the arrow name to the icon name. |
| 8 | $arrow_name = [ |
| 9 | 'none' => '', |
| 10 | 'arrow' => is_rtl() ? 'arrow-right' : 'arrow-left', |
| 11 | 'chevron' => is_rtl() ? 'chevron-right' : 'chevron-left', |
| 12 | ][ $pagination_arrow ] ?? $pagination_arrow; |
| 13 | |
| 14 | $query = sc_product_list_query( $block ); |
| 15 | $page_link = $query->previous_page_link; |
| 16 | |
| 17 | // Render the block. |
| 18 | return 'file:./view.php'; |
| 19 |