Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,14 @@ protected PsiFile createForm(
protected void fillAttributes(final @NotNull Properties attributes) {
final PhpClassTypesBuilder phpClassTypesBuilder = new PhpClassTypesBuilder();

if (data.getFields().isEmpty()) {
phpClassTypesBuilder
.appendProperty("PRIMARY_FIELD", "");
} else {
phpClassTypesBuilder
.appendProperty("PRIMARY_FIELD", data.getFields().get(0).getName());
}

phpClassTypesBuilder
.appendProperty("NAME", data.getFormName())
.appendProperty("LABEL", data.getLabel())
Expand All @@ -165,7 +173,6 @@ protected void fillAttributes(final @NotNull Properties attributes) {
data.getDataProviderPath()
).getClassFqn()
)
.appendProperty("PRIMARY_FIELD", data.getFields().get(0).getName())
.mergeProperties(attributes);
}

Expand Down