Skip to content

Translateable behavior properties#296

Open
OndrejVasicek wants to merge 4 commits intoschmunk42:masterfrom
OndrejVasicek:translateable-behavior-properties
Open

Translateable behavior properties#296
OndrejVasicek wants to merge 4 commits intoschmunk42:masterfrom
OndrejVasicek:translateable-behavior-properties

Conversation

@OndrejVasicek
Copy link
Copy Markdown

When opt-in the Use Translatable Behavior checkbox, some additional code is generated to the model.
The main point of the Translatable Behavior is bring the attributes from "language tables" to the main model via magic properties.
The generator already have the list of attributes, so it would be great if it could generate PHPDOC for the relevant properties to achieve auto-completion for IDE

I tried to make the changes, it works for me, hope I didn't break anything. It should be quite small but helpful change.

@schmunk42 schmunk42 requested a review from eluhr August 16, 2023 07:46
There shloud be propbably some more system solution then this hard overwrite.
@schmunk42
Copy link
Copy Markdown
Owner

Since it changes the return value of a protected method, it might break BC for custom generators.

Our proposal would be to add an additional index like fieldDefinitions to the return array which contains the names and types (shouldn't this be actually phpType?) - like the changes in this PR. And keep fields as it was.

WDYT?

CC: @eluhr @handcode

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants