Skip to content

[4.0] Get categories from component#30613

Merged
wilsonge merged 2 commits intojoomla:4.0-devfrom
SharkyKZ:j4/cleanup/field-categories
Sep 12, 2020
Merged

[4.0] Get categories from component#30613
wilsonge merged 2 commits intojoomla:4.0-devfrom
SharkyKZ:j4/cleanup/field-categories

Conversation

@SharkyKZ
Copy link
Contributor

Pull Request for Issue #26157 (comment).

Summary of Changes

Get categories from component instead of using deprecated JCategories::getInstance().

Testing Instructions

Create a custom field for articles.
Assign to Uncategorised category.
Create an article. Select Uncategorised category.
Check that custom field appears in form.

Expected result AFTER applying this Pull Request

Works like before.

Documentation Changes Required

No.

@ghost
Copy link

ghost commented Sep 11, 2020

I have tested this item ✅ successfully on 827a8d5


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30613.

1 similar comment
@chmst
Copy link
Contributor

chmst commented Sep 11, 2020

I have tested this item ✅ successfully on 827a8d5


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30613.

@Quy
Copy link
Contributor

Quy commented Sep 11, 2020

RTC


This comment was created with the J!Tracker Application at issues.joomla.org/tracker/joomla-cms/30613.

@Quy Quy removed the PR-4.0-dev label Sep 11, 2020
@joomla-cms-bot joomla-cms-bot added the RTC This Pull Request is Ready To Commit label Sep 11, 2020
@Quy Quy added the PR-4.0-dev label Sep 11, 2020
@wilsonge
Copy link
Contributor

Will this still work on J3 style components that don't use services?

@SharkyKZ
Copy link
Contributor Author

It should. Legacy components implement Joomla\CMS\Categories\CategoryServiceInterface.

class LegacyComponent
implements ComponentInterface, MVCFactoryServiceInterface, CategoryServiceInterface, FieldsServiceInterface, RouterServiceInterface,
TagServiceInterface
{

Works with Weblinks 3.7.0.

@wilsonge wilsonge merged commit 2159737 into joomla:4.0-dev Sep 12, 2020
@wilsonge
Copy link
Contributor

Cool - thanks!

@joomla-cms-bot joomla-cms-bot removed the RTC This Pull Request is Ready To Commit label Sep 12, 2020
@wilsonge wilsonge added this to the Joomla 4.0 milestone Sep 12, 2020
sakiss pushed a commit to sakiss/joomla-cms that referenced this pull request Oct 16, 2020
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.

5 participants