Wc
1 week ago
CheckboxDefaultType.php
1 week ago
CheckboxType.php
1 week ago
ColorType.php
1 week ago
DateType.php
1 week ago
DefaultType.php
1 week ago
EmailType.php
1 week ago
FileType.php
1 week ago
HeadingType.php
1 week ago
HiddenType.php
1 week ago
HtmlType.php
1 week ago
ImageType.php
1 week ago
MultiCheckboxType.php
1 week ago
MultiSelectType.php
1 week ago
NumberType.php
1 week ago
ParagraphType.php
1 week ago
PhoneType.php
1 week ago
RadioColorsType.php
1 week ago
RadioDefaultType.php
1 week ago
RadioImagesType.php
1 week ago
RadioType.php
1 week ago
SelectType.php
1 week ago
TextType.php
1 week ago
TextareaType.php
1 week ago
TimeType.php
1 week ago
TypeAbstract.php
1 week ago
TypeIntegration.php
1 week ago
TypeInterface.php
1 week ago
UrlType.php
1 week ago
HtmlType.php
87 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPDesk\FCF\Free\Field\Type; |
| 4 | |
| 5 | use WPDesk\FCF\Free\Field\Types; |
| 6 | use WPDesk\FCF\Free\Settings\Option\CssOption; |
| 7 | use WPDesk\FCF\Free\Settings\Option\CustomFieldOption; |
| 8 | use WPDesk\FCF\Free\Settings\Option\EnabledOption; |
| 9 | use WPDesk\FCF\Free\Settings\Option\FieldTypeOption; |
| 10 | use WPDesk\FCF\Free\Settings\Option\LabelOption; |
| 11 | use WPDesk\FCF\Free\Settings\Option\LogicAdvOption; |
| 12 | use WPDesk\FCF\Free\Settings\Option\NameOption; |
| 13 | use WPDesk\FCF\Free\Settings\Option\OptionInterface; |
| 14 | use WPDesk\FCF\Free\Settings\Option\PriorityOption; |
| 15 | use WPDesk\FCF\Free\Settings\Option\RequiredHiddenOption; |
| 16 | use WPDesk\FCF\Free\Settings\Tab\AppearanceTab; |
| 17 | use WPDesk\FCF\Free\Settings\Tab\GeneralTab; |
| 18 | use WPDesk\FCF\Free\Settings\Tab\LogicTab; |
| 19 | |
| 20 | /** |
| 21 | * {@inheritdoc} |
| 22 | */ |
| 23 | class HtmlType extends TypeAbstract { |
| 24 | |
| 25 | const FIELD_TYPE = 'info'; |
| 26 | |
| 27 | /** |
| 28 | * {@inheritdoc} |
| 29 | */ |
| 30 | public function get_field_type(): string { |
| 31 | return self::FIELD_TYPE; |
| 32 | } |
| 33 | |
| 34 | /** |
| 35 | * {@inheritdoc} |
| 36 | */ |
| 37 | public function get_field_type_label(): string { |
| 38 | return __( 'HTML', 'flexible-checkout-fields' ); |
| 39 | } |
| 40 | |
| 41 | /** |
| 42 | * {@inheritdoc} |
| 43 | */ |
| 44 | public function get_field_group(): string { |
| 45 | return Types::FIELD_GROUP_OTHER; |
| 46 | } |
| 47 | |
| 48 | /** |
| 49 | * {@inheritdoc} |
| 50 | */ |
| 51 | public function get_field_type_icon(): string { |
| 52 | return 'icon-code'; |
| 53 | } |
| 54 | |
| 55 | /** |
| 56 | * {@inheritdoc} |
| 57 | */ |
| 58 | public function is_available(): bool { |
| 59 | return true; |
| 60 | } |
| 61 | |
| 62 | /** |
| 63 | * Returns list of options for field settings. |
| 64 | * |
| 65 | * @return OptionInterface[] List of option fields. |
| 66 | */ |
| 67 | public function get_options_objects(): array { |
| 68 | return [ |
| 69 | GeneralTab::TAB_NAME => [ |
| 70 | PriorityOption::FIELD_NAME => new PriorityOption(), |
| 71 | FieldTypeOption::FIELD_NAME => new FieldTypeOption(), |
| 72 | CustomFieldOption::FIELD_NAME => new CustomFieldOption(), |
| 73 | EnabledOption::FIELD_NAME => new EnabledOption(), |
| 74 | RequiredHiddenOption::FIELD_NAME => new RequiredHiddenOption(), |
| 75 | LabelOption::FIELD_NAME => new LabelOption(), |
| 76 | NameOption::FIELD_NAME => new NameOption(), |
| 77 | ], |
| 78 | AppearanceTab::TAB_NAME => [ |
| 79 | CssOption::FIELD_NAME => new CssOption(), |
| 80 | ], |
| 81 | LogicTab::TAB_NAME => [ |
| 82 | LogicAdvOption::FIELD_NAME => new LogicAdvOption(), |
| 83 | ], |
| 84 | ]; |
| 85 | } |
| 86 | } |
| 87 |