-
Notifications
You must be signed in to change notification settings - Fork 9.4k
Update ViewAction.php #6742
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
Closed
Closed
Update ViewAction.php #6742
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
In flles magento/module-sales/view/adminhtml/ui_component/sales_order_view_creditmemo_grid.xml magento/module-sales/view/adminhtml/ui_component/sales_order_view_invoice_grid.xml magento/module-sales/view/adminhtml/ui_component/sales_order_view_shipment_grid.xml the following snippet is used: <actionsColumn name="actions" class="Magento\Sales\Ui\Component\Listing\Column\ViewAction"> <argument name="data" xsi:type="array"> <item name="config" xsi:type="array"> <item name="indexField" xsi:type="string">entity_id</item> <item name="viewUrlPath" xsi:type="string">sales/order_creditmemo/view</item> <item name="urlEntityParamName" xsi:type="string">creditmemo_id</item> </item> </argument> </actionsColumn> however, unlike "viewUrlPath" and "urlEntityParamName" the item named "indexField" is not implemented in the code of Magento\Sales\Ui\Component\Listing\Column\ViewAction It is needed when adding a custom table the same way as credmemo, invoice and shipment grids with a an index field other than "entity_id"
orlangur
requested changes
May 17, 2017
$viewUrlPath = $this->getData('config/viewUrlPath') ?: '#'; | ||
$urlEntityParamName = $this->getData('config/urlEntityParamName') ?: 'entity_id'; | ||
$item[$this->getData('name')] = [ | ||
'view' => [ | ||
'href' => $this->urlBuilder->getUrl( | ||
$viewUrlPath, | ||
[ | ||
$urlEntityParamName => $item['entity_id'] | ||
$urlEntityParamName => $item[$indexField] |
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.
Why need such flexibility? Please provide a valid use case.
Closing for now due to no response from author. |
mmansoor-magento
pushed a commit
that referenced
this pull request
Aug 10, 2021
…ync-3302021 cia-2.4.3-2.4-sync
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In flles
magento/module-sales/view/adminhtml/ui_component/sales_order_view_creditmemo_grid.xml
magento/module-sales/view/adminhtml/ui_component/sales_order_view_invoice_grid.xml
magento/module-sales/view/adminhtml/ui_component/sales_order_view_shipment_grid.xml
the following snippet is used: