| 1 |
<?php |
| 2 |
|
| 3 |
/** |
| 4 |
* BlockAttributes class for defining Gutenberg block attributes |
| 5 |
* |
| 6 |
* @copyright © TMS-Plugins. All rights reserved. |
| 7 |
* @licence See LICENCE.md for license details. |
| 8 |
*/ |
| 9 |
|
| 10 |
namespace IvyForms\Services\Integrations\Gutenberg\Blocks; |
| 11 |
|
| 12 |
// phpcs:disable PSR1.Files.SideEffects |
| 13 |
if (!defined('ABSPATH')) { |
| 14 |
exit; // Exit if accessed directly |
| 15 |
} |
| 16 |
|
| 17 |
/** |
| 18 |
* Class BlockAttributes |
| 19 |
* |
| 20 |
* @package IvyForms\Services\Blocks |
| 21 |
*/ |
| 22 |
class BlockAttributes |
| 23 |
{ |
| 24 |
/** |
| 25 |
* Get all attributes for the IvyForms Gutenberg block |
| 26 |
* |
| 27 |
* @return array<string, array<string, mixed>> Block attributes configuration |
| 28 |
*/ |
| 29 |
public static function getAttributes(): array |
| 30 |
{ |
| 31 |
return [ |
| 32 |
'formId' => [ |
| 33 |
'type' => 'string', |
| 34 |
'default' => '', |
| 35 |
], |
| 36 |
'showTitle' => [ |
| 37 |
'type' => 'boolean', |
| 38 |
'default' => true, |
| 39 |
], |
| 40 |
'showDescription' => [ |
| 41 |
'type' => 'boolean', |
| 42 |
'default' => true, |
| 43 |
], |
| 44 |
'customCssClass' => [ |
| 45 |
'type' => 'string', |
| 46 |
'default' => '', |
| 47 |
], |
| 48 |
'className' => [ |
| 49 |
'type' => 'string', |
| 50 |
'default' => '', |
| 51 |
], |
| 52 |
]; |
| 53 |
} |
| 54 |
} |
| 55 |
|