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

[11.x] Add getModel method to FactoryClass for more code flexibility #53902

Closed
wants to merge 1 commit into from

Conversation

a21ns1g4ts
Copy link

@a21ns1g4ts a21ns1g4ts commented Dec 15, 2024

Introduced a getModel() method to encapsulate access to the $model property.
Updated the modelName() method to use getModel() for more flexibility to factories. It can be used when using third party factories.

@a21ns1g4ts a21ns1g4ts changed the title [11.x] Add getModel method for cleaner model access [11.x] Add getModel method for more code flexibility Dec 15, 2024
@a21ns1g4ts a21ns1g4ts changed the title [11.x] Add getModel method for more code flexibility [11.x] Add getModel method to FactoryClass for more code flexibility Dec 15, 2024
@crynobone
Copy link
Member

crynobone commented Dec 16, 2024

Shouldn't overriding the modelName() be the way to go here?

@a21ns1g4ts
Copy link
Author

a21ns1g4ts commented Dec 16, 2024

Shouldn't overriding the modelName() be the way to go there?

Yep, good way. Closing this PR.

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