| @@ -1,0 +1,62 @@ | ||
| 1 | +<?php | |
| 2 | +use ABlocks\Controls\Range; | |
| 3 | + | |
| 4 | +if ( ! defined( 'ABSPATH' ) ) { | |
| 5 | + exit; | |
| 6 | +} | |
| 7 | + | |
| 8 | +$attributes = [ | |
| 9 | + 'block_id' => array( | |
| 10 | + 'type' => 'string', | |
| 11 | + 'default' => '' | |
| 12 | + ), | |
| 13 | + 'label' => [ | |
| 14 | + 'type' => 'string', | |
| 15 | + 'default' => 'Checkbox', | |
| 16 | + ], | |
| 17 | + | |
| 18 | + 'errorMsg' => [ | |
| 19 | + 'type' => 'string', | |
| 20 | + 'default' => 'This field is required', | |
| 21 | + ], | |
| 22 | + 'helperText' => [ | |
| 23 | + 'type' => 'string', | |
| 24 | + 'default' => '', | |
| 25 | + ], | |
| 26 | + 'inputType' => [ | |
| 27 | + 'type' => 'string', | |
| 28 | + 'default' => '' | |
| 29 | + ], | |
| 30 | + 'name' => [ | |
| 31 | + 'type' => 'string', | |
| 32 | + 'default' => '' | |
| 33 | + ], | |
| 34 | + 'isRequired' => [ | |
| 35 | + 'type' => 'boolean', | |
| 36 | + 'default' => false, | |
| 37 | + ], | |
| 38 | + 'isChecked' => [ | |
| 39 | + 'type' => 'boolean', | |
| 40 | + 'default' => false, | |
| 41 | + ], | |
| 42 | + 'placeholder' => [ | |
| 43 | + 'type' => 'string', | |
| 44 | + 'default' => 'Enter your message' | |
| 45 | + ], | |
| 46 | +]; | |
| 47 | + | |
| 48 | +$attributes = array_merge( | |
| 49 | + $attributes, | |
| 50 | + Range::get_attribute( [ | |
| 51 | + 'attributeName' => 'inputWidth', | |
| 52 | + 'attributeObjectKey' => 'value', | |
| 53 | + 'isResponsive' => true, | |
| 54 | + 'defaultValue' => 100, | |
| 55 | + 'hasUnit' => true, | |
| 56 | + 'unitDefaultValue' => '%', | |
| 57 | + ] ), | |
| 58 | +); | |
| 59 | + | |
| 60 | + | |
| 61 | +return array_merge( $attributes, \ABlocks\Classes\BlockGlobal::get_attributes() ); | |
| 62 | + | |