Wc
3 weeks ago
CheckboxDefaultType.php
3 weeks ago
CheckboxType.php
3 weeks ago
ColorType.php
3 weeks ago
DateType.php
3 weeks ago
DefaultType.php
3 weeks ago
EmailType.php
3 weeks ago
FileType.php
3 weeks ago
HeadingType.php
3 weeks ago
HiddenType.php
3 weeks ago
HtmlType.php
3 weeks ago
ImageType.php
3 weeks ago
MultiCheckboxType.php
3 weeks ago
MultiSelectType.php
3 weeks ago
NumberType.php
3 weeks ago
ParagraphType.php
3 weeks ago
PhoneType.php
3 weeks ago
RadioColorsType.php
3 weeks ago
RadioDefaultType.php
3 weeks ago
RadioImagesType.php
3 weeks ago
RadioType.php
3 weeks ago
SelectType.php
3 weeks ago
TextType.php
3 weeks ago
TextareaType.php
3 weeks ago
TimeType.php
3 weeks ago
TypeAbstract.php
3 weeks ago
TypeIntegration.php
3 weeks ago
TypeInterface.php
3 weeks ago
UrlType.php
3 weeks ago
RadioDefaultType.php
36 lines
| 1 | <?php |
| 2 | |
| 3 | namespace WPDesk\FCF\Free\Field\Type; |
| 4 | |
| 5 | use WPDesk\FCF\Free\Settings\Option\FieldTypeOption; |
| 6 | use WPDesk\FCF\Free\Settings\Option\OptionInterface; |
| 7 | use WPDesk\FCF\Free\Settings\Tab\GeneralTab; |
| 8 | |
| 9 | /** |
| 10 | * {@inheritdoc} |
| 11 | */ |
| 12 | class RadioDefaultType extends DefaultType implements TypeInterface { |
| 13 | |
| 14 | const FIELD_TYPE = 'radio'; |
| 15 | |
| 16 | /** |
| 17 | * {@inheritdoc} |
| 18 | */ |
| 19 | public function get_field_type(): string { |
| 20 | return self::FIELD_TYPE; |
| 21 | } |
| 22 | |
| 23 | /** |
| 24 | * Returns list of options for field settings. |
| 25 | * |
| 26 | * @return OptionInterface[] List of option fields. |
| 27 | */ |
| 28 | public function get_options_objects(): array { |
| 29 | $options = parent::get_options_objects(); |
| 30 | |
| 31 | $options[ GeneralTab::TAB_NAME ][ FieldTypeOption::FIELD_NAME ] = new FieldTypeOption(); |
| 32 | |
| 33 | return $options; |
| 34 | } |
| 35 | } |
| 36 |