| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* @copyright © Melograno Venture Studio. All rights reserved. |
| 5 |
* @licence See LICENCE.md for license details. |
| 6 |
*/ |
| 7 |
|
| 8 |
namespace IvyForms\Services\Form\Style; |
| 9 |
|
| 10 |
// phpcs:disable PSR1.Files.SideEffects |
| 11 |
|
| 12 |
if (!defined('ABSPATH')) { |
| 13 |
exit; // Exit if accessed directly |
| 14 |
} |
| 15 |
|
| 16 |
/** |
| 17 |
* Class StyleGeneratorFactory |
| 18 |
* |
| 19 |
* Factory for creating style generators. |
| 20 |
* Centralizes the creation and registration of all style generators. |
| 21 |
* |
| 22 |
* @package IvyForms\Common\Helpers\StyleHelpers |
| 23 |
*/ |
| 24 |
class StyleGeneratorFactory |
| 25 |
{ |
| 26 |
/** |
| 27 |
* Create and return all style generators |
| 28 |
* |
| 29 |
* @return StyleGeneratorInterface[] |
| 30 |
*/ |
| 31 |
public static function createGenerators(): array |
| 32 |
{ |
| 33 |
return [ |
| 34 |
new FormWrapperStyleGenerator(), |
| 35 |
new FormTextStyleGenerator(), |
| 36 |
new FieldStyleGenerator(), |
| 37 |
new ButtonStyleGenerator(), |
| 38 |
new CheckboxRadioStyleGenerator(), |
| 39 |
]; |
| 40 |
} |
| 41 |
} |
| 42 |
|