| 1 |
<?php namespace TierPricingTable\Addons\ReactProductEditorAddon\Blocks; |
| 2 |
|
| 3 |
use TierPricingTable\Addons\ReactProductEditorAddon\Block; |
| 4 |
use TierPricingTable\Addons\ReactProductEditorAddon\Sections\AdvanceProductOptionSection; |
| 5 |
use TierPricingTable\TierPricingTablePlugin; |
| 6 |
|
| 7 |
class AdvanceProductOptions extends Block { |
| 8 |
|
| 9 |
public function getCustomBlockFolder(): string { |
| 10 |
return __DIR__ . '/../js/advance-product-options'; |
| 11 |
} |
| 12 |
|
| 13 |
public function getId(): string { |
| 14 |
return 'tiered-pricing-table/product-editor-advance-product-options'; |
| 15 |
} |
| 16 |
|
| 17 |
public function getBlockName(): string { |
| 18 |
return 'tiered-pricing-table/product-editor-advance-product-options'; |
| 19 |
} |
| 20 |
|
| 21 |
public function getOrder(): int { |
| 22 |
return 30; |
| 23 |
} |
| 24 |
|
| 25 |
public function getSectionId(): string { |
| 26 |
return AdvanceProductOptionSection::ID; |
| 27 |
} |
| 28 |
|
| 29 |
public function getAttributes(): array { |
| 30 |
return array( |
| 31 |
'availableRoles' => wp_roles()->roles, |
| 32 |
'availableLayouts' => TierPricingTablePlugin::getAvailablePricingLayouts(), |
| 33 |
); |
| 34 |
} |
| 35 |
|
| 36 |
public function isCustomBlock(): bool { |
| 37 |
return true; |
| 38 |
} |
| 39 |
} |
| 40 |
|