User tests: Successful: Unsuccessful:
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.
Everything should work the same.
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
Status | New | ⇒ | Pending |
Category | ⇒ | Administration com_associations com_categories com_checkin com_config com_contact com_content com_contenthistory com_fields com_finder |
Can we then not deprecate the get function?
I'm open for this, but that would be out of scope for this PR.
Labels |
Added:
PR-5.3-dev
|
Category | Administration com_associations com_categories com_checkin com_config com_contact com_content com_contenthistory com_fields com_finder | ⇒ | Administration com_associations com_banners com_cache com_categories com_checkin com_config com_contact com_content com_contenthistory com_fields com_finder |
Status | Pending | ⇒ | Fixed in Code Base |
Closed_Date | 0000-00-00 00:00:00 | ⇒ | 2024-10-01 07:29:11 |
Closed_By | ⇒ | laoneo |
Thanks!
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
administrator/components/com_associations/src/View/Associations/HtmlView.php
: Replaced direct calls toget
methods with corresponding methods fromAssociationsModel
. [1] [2] [3]administrator/components/com_categories/src/View/Categories/HtmlView.php
: Updated to useCategoriesModel
for retrieving state, items, pagination, and other data.administrator/components/com_categories/src/View/Category/HtmlView.php
: Switched to usingCategoryModel
for form, item, state, and associated data. [1] [2]administrator/components/com_checkin/src/View/Checkin/HtmlView.php
: Modified to useCheckinModel
for items, pagination, state, total, and filters.administrator/components/com_config/src/View/Application/HtmlView.php
: Changed to useApplicationModel
for form, data, and user information.administrator/components/com_config/src/View/Component/HtmlView.php
: Updated to useComponentModel
for component and form data.administrator/components/com_contact/src/View/Contact/HtmlView.php
: Refactored to useContactModel
for form, item, and state. [1] [2]administrator/components/com_contact/src/View/Contacts/HtmlView.php
: Adjusted to useContactsModel
for items, pagination, state, and filters.administrator/components/com_content/src/View/Article/HtmlView.php
: Updated to useArticleModel
for form, item, and state. [1] [2]administrator/components/com_content/src/View/Articles/HtmlView.php
: Refactored to useArticlesModel
for items, pagination, state, and filters. [1] [2]Adding Model Imports
administrator/components/com_associations/src/View/Associations/HtmlView.php
: AddedAssociationsModel
import.administrator/components/com_categories/src/View/Categories/HtmlView.php
: AddedCategoriesModel
import.administrator/components/com_categories/src/View/Category/HtmlView.php
: AddedCategoryModel
import.administrator/components/com_checkin/src/View/Checkin/HtmlView.php
: AddedCheckinModel
import.administrator/components/com_config/src/View/Application/HtmlView.php
: AddedApplicationModel
import.administrator/components/com_config/src/View/Component/HtmlView.php
: AddedComponentModel
import.administrator/components/com_contact/src/View/Contact/HtmlView.php
: AddedContactModel
import.administrator/components/com_contact/src/View/Contacts/HtmlView.php
: AddedContactsModel
import.administrator/components/com_content/src/View/Article/HtmlView.php
: AddedArticleModel
import.administrator/components/com_content/src/View/Articles/HtmlView.php
: AddedArticlesModel
import.administrator/components/com_content/src/View/Featured/HtmlView.php
: AddedFeaturedModel
import.(this was a test to see if the copilot generated descriptions are helpful)