| 1 |
<?php |
| 2 |
|
| 3 |
namespace FluentCart\App\Hooks\Handlers\ShortCodes; |
| 4 |
|
| 5 |
use FluentCart\App\Services\Renderer\CustomerDashboardButtonRenderer; |
| 6 |
|
| 7 |
class CustomerDashboardButtonShortcode extends ShortCode |
| 8 |
{ |
| 9 |
protected static string $shortCodeName = 'fluent_cart_customer_dashboard_button'; |
| 10 |
|
| 11 |
public function getStyles(): array |
| 12 |
{ |
| 13 |
return [ |
| 14 |
'public/customer-dashboard-button/customer-dashboard-button.scss', |
| 15 |
]; |
| 16 |
} |
| 17 |
|
| 18 |
public function render(?array $viewData = null) |
| 19 |
{ |
| 20 |
$data = $viewData ?? $this->shortCodeAttributes ?? []; |
| 21 |
$data['is_shortcode'] = true; |
| 22 |
|
| 23 |
$renderer = new CustomerDashboardButtonRenderer(); |
| 24 |
$renderer->render($data); |
| 25 |
} |
| 26 |
} |