File tree Expand file tree Collapse file tree 1 file changed +41
-0
lines changed
src/main/java/com/cedricziel/idea/typo3/util Expand file tree Collapse file tree 1 file changed +41
-0
lines changed Original file line number Diff line number Diff line change 33import com .intellij .psi .PsiElement ;
44
55import java .util .Arrays ;
6+ import java .util .HashSet ;
7+ import java .util .Set ;
68
79import static com .cedricziel .idea .typo3 .psi .PhpElementsUtil .extractArrayIndexFromValue ;
810
@@ -13,9 +15,48 @@ public class TCAUtil {
1315 "allowed" ,
1416 };
1517
18+ public static final String [] TCA_CORE_TYPES = {
19+ "flex" ,
20+ "group" ,
21+ "imageManipulation" ,
22+ "input" ,
23+ "inline" ,
24+ "none" ,
25+ "passthrough" ,
26+ "radio" ,
27+ "select" ,
28+ "text" ,
29+ "user" ,
30+ };
31+
32+ public static final String [] TCA_CORE_RENDER_TYPES = {
33+ "selectSingle" ,
34+ "selectSingleBox" ,
35+ "selectCheckBox" ,
36+ "selectMultipleSideBySide" ,
37+ "selectTree" ,
38+ "colorpicker" ,
39+ "inputDateTime" ,
40+ "inputLink" ,
41+ "rsaInput" ,
42+ "belayoutwizard" ,
43+ "t3editor" ,
44+ "textTable" ,
45+ };
46+
1647 public static boolean arrayIndexIsTCATableNameField (PsiElement element ) {
1748 String arrayIndex = extractArrayIndexFromValue (element );
1849
1950 return Arrays .asList (TCA_TABLE_FIELDS ).contains (arrayIndex );
2051 }
52+
53+ public static Set <String > getAvailableRenderTypes (PsiElement element ) {
54+
55+ return new HashSet <>(Arrays .asList (TCA_CORE_RENDER_TYPES ));
56+ }
57+
58+ public static Set <String > getAvailableColumnTypes (PsiElement element ) {
59+
60+ return new HashSet <>(Arrays .asList (TCA_CORE_TYPES ));
61+ }
2162}
You can’t perform that action at this time.
0 commit comments