Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Translateable behavior properties #296

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

OndrejVasicek
Copy link

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
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