Skip to content

Commit a565e46

Browse files
committed
Add core column types and renderTypes to TCA Util
1 parent f72ec2f commit a565e46

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

src/main/java/com/cedricziel/idea/typo3/util/TCAUtil.java

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
import com.intellij.psi.PsiElement;
44

55
import java.util.Arrays;
6+
import java.util.HashSet;
7+
import java.util.Set;
68

79
import 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
}

0 commit comments

Comments
 (0)