-
Notifications
You must be signed in to change notification settings - Fork 91
#1456 - Removed SelectModifierInterface and added CollectionProcessor #1473
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
#1456 - Removed SelectModifierInterface and added CollectionProcessor #1473
Conversation
@magento run all tests |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR @gabrieldagama , please see my review comments
@@ -33,11 +33,11 @@ | |||
</argument> | |||
</arguments> | |||
</type> | |||
<type name="Magento\MediaGalleryUi\Model\SelectModifierComposite"> | |||
<virtualType name="Magento\MediaGalleryUi\Model\Api\SearchCriteria\CollectionProcessor\JoinProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This virtual type is already declared in MediaGalleryUi module, so I think there is no need to specify the type
<virtualType name="Magento\MediaGalleryUi\Model\Api\SearchCriteria\CollectionProcessor\JoinProcessor" type="Magento\Framework\Api\SearchCriteria\CollectionProcessor\JoinProcessor"> | |
<virtualType name="Magento\MediaGalleryUi\Model\Api\SearchCriteria\CollectionProcessor\JoinProcessor"> |
@@ -73,7 +83,6 @@ public function getData(): array | |||
try { | |||
/** @var SearchResult $searchResult */ | |||
$searchResult = $this->getSearchResult(); | |||
$this->selectModifier->apply($searchResult->getSelect(), $this->getSearchCriteria()); | |||
|
|||
return $this->searchResultToOutput($searchResult); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Unnecessary variable can be eliminated
return $this->searchResultToOutput($searchResult); | |
return $this->searchResultToOutput($this->getSearchResult()); |
'keywords_table.keyword_id = asset_keywords_table.id', | ||
['asset_id'] | ||
), | ||
->joinInner( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's keep the consistent formatting in this method (let's move )
to the next line)
@magento run all tests |
@magento run all tests |
✔️ QA Passed Rechecked the:
|
Hi @gabrieldagama, thank you for your contribution! |
Description (*)
Removed SelectModifierInterface and added CollectionProcessor to the MediaGalleryUi DataProvider.
Fixed Issues (if relevant)
Manual testing scenarios (*)
Content
->Media Gallery