Skip to content

[5.3] Refactoring views to directly call models (com_actionlogs to com_finder) #44149

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

Merged
merged 3 commits into from
Oct 1, 2024

Conversation

Hackwar
Copy link
Member

@Hackwar Hackwar commented Sep 27, 2024

Summary of Changes

This PR refactors the views to get the model object and then directly call the methods of the model instead of going through the View::get() indirection. This refactors the views of the backend components from com_actionlogs to com_finder.

Testing Instructions

Everything should work the same.

Link to documentations

Please select:

  • Documentation link for docs.joomla.org:

  • No documentation changes for docs.joomla.org needed

  • Pull Request link for manual.joomla.org:

  • No documentation changes for manual.joomla.org needed

@brianteeman
Copy link
Contributor

This pull request includes several changes across multiple files to refactor the way models are used within the HtmlView classes. The main goal is to standardize how data is retrieved by using model methods instead of direct calls within the view. Below are the most important changes grouped by theme:

Refactoring to Use Models in Views

Adding Model Imports

(this was a test to see if the copilot generated descriptions are helpful)

@laoneo
Copy link
Member

laoneo commented Sep 30, 2024

Can we then not deprecate the get function?

@Hackwar
Copy link
Member Author

Hackwar commented Sep 30, 2024

I'm open for this, but that would be out of scope for this PR.

@Hackwar
Copy link
Member Author

Hackwar commented Sep 30, 2024

See #44162

@laoneo laoneo merged commit 6682213 into joomla:5.3-dev Oct 1, 2024
3 checks passed
@laoneo
Copy link
Member

laoneo commented Oct 1, 2024

Thanks!

@laoneo laoneo added this to the Joomla! 5.3.0 milestone Oct 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants