@@ 703-711 (lines=9) @@ | ||
700 | ) { |
|
701 | $fields = []; |
|
702 | switch ($type) { |
|
703 | case 'single_line': |
|
704 | $fields[$type][] = [ |
|
705 | 'fieldName' => lcfirst(Container::camelize($name)), |
|
706 | 'type' => 'string', |
|
707 | 'length' => '255', |
|
708 | 'formType' => TextType::class, |
|
709 | 'nullable' => $allNullable, |
|
710 | ]; |
|
711 | ||
712 | break; |
|
713 | case 'multi_line': |
|
714 | $fields[$type][] = [ |
|
@@ 713-720 (lines=8) @@ | ||
710 | ]; |
|
711 | ||
712 | break; |
|
713 | case 'multi_line': |
|
714 | $fields[$type][] = [ |
|
715 | 'fieldName' => lcfirst(Container::camelize($name)), |
|
716 | 'type' => 'text', |
|
717 | 'formType' => TextareaType::class, |
|
718 | 'nullable' => $allNullable, |
|
719 | ]; |
|
720 | ||
721 | break; |
|
722 | case 'wysiwyg': |
|
723 | $fields[$type][] = [ |
|
@@ 722-729 (lines=8) @@ | ||
719 | ]; |
|
720 | ||
721 | break; |
|
722 | case 'wysiwyg': |
|
723 | $fields[$type][] = [ |
|
724 | 'fieldName' => lcfirst(Container::camelize($name)), |
|
725 | 'type' => 'text', |
|
726 | 'formType' => WysiwygType::class, |
|
727 | 'nullable' => $allNullable, |
|
728 | ]; |
|
729 | ||
730 | break; |
|
731 | case 'link': |
|
732 | foreach (['url', 'text'] as $subField) { |
|
@@ 842-849 (lines=8) @@ | ||
839 | ]; |
|
840 | ||
841 | break; |
|
842 | case 'boolean': |
|
843 | $fields[$type][] = [ |
|
844 | 'fieldName' => lcfirst(Container::camelize($name)), |
|
845 | 'type' => 'boolean', |
|
846 | 'formType' => CheckboxType::class, |
|
847 | 'nullable' => $allNullable, |
|
848 | ]; |
|
849 | ||
850 | break; |
|
851 | case 'integer': |
|
852 | $fields[$type][] = [ |
|
@@ 851-858 (lines=8) @@ | ||
848 | ]; |
|
849 | ||
850 | break; |
|
851 | case 'integer': |
|
852 | $fields[$type][] = [ |
|
853 | 'fieldName' => lcfirst(Container::camelize($name)), |
|
854 | 'type' => 'integer', |
|
855 | 'formType' => IntegerType::class, |
|
856 | 'nullable' => $allNullable, |
|
857 | ]; |
|
858 | ||
859 | break; |
|
860 | case 'decimal': |
|
861 | $fields[$type][] = [ |
|
@@ 860-869 (lines=10) @@ | ||
857 | ]; |
|
858 | ||
859 | break; |
|
860 | case 'decimal': |
|
861 | $fields[$type][] = [ |
|
862 | 'fieldName' => lcfirst(Container::camelize($name)), |
|
863 | 'type' => 'decimal', |
|
864 | 'precision' => 10, |
|
865 | 'scale' => 2, |
|
866 | 'formType' => NumberType::class, |
|
867 | 'nullable' => $allNullable, |
|
868 | ]; |
|
869 | ||
870 | break; |
|
871 | case 'datetime': |
|
872 | $fields[$type][] = [ |
|
@@ 871-878 (lines=8) @@ | ||
868 | ]; |
|
869 | ||
870 | break; |
|
871 | case 'datetime': |
|
872 | $fields[$type][] = [ |
|
873 | 'fieldName' => lcfirst(Container::camelize($name)), |
|
874 | 'type' => 'datetime', |
|
875 | 'formType' => DateTimeType::class, |
|
876 | 'nullable' => $allNullable, |
|
877 | ]; |
|
878 | ||
879 | break; |
|
880 | } |
|
881 |