File tree Expand file tree Collapse file tree 1 file changed +8
-8
lines changed
InventoryAdminUi/Ui/Component/Listing/Stock/Column Expand file tree Collapse file tree 1 file changed +8
-8
lines changed Original file line number Diff line number Diff line change @@ -46,20 +46,20 @@ public function __construct(
4646 /**
4747 * @inheritDoc
4848 */
49- public function prepareDataSource (array $ dataSource )
49+ public function prepareDataSource (array $ sourceData )
5050 {
51- $ dataSource = parent ::prepareDataSource ($ dataSource );
52- $ actionsName = $ this ->getData ('name ' );
51+ $ sourceData = parent ::prepareDataSource ($ sourceData );
52+ $ actionsTitle = $ this ->getData ('name ' );
5353
54- if (isset ($ dataSource ['data ' ]['items ' ])) {
55- foreach ($ dataSource ['data ' ]['items ' ] as &$ item ) {
56- if (!empty ($ item [$ actionsName ]['edit ' ])) {
57- $ item [$ actionsName ]['edit ' ]['hidden ' ] =
54+ if (isset ($ sourceData ['data ' ]['items ' ])) {
55+ foreach ($ sourceData ['data ' ]['items ' ] as &$ item ) {
56+ if (!empty ($ item [$ actionsTitle ]['edit ' ])) {
57+ $ item [$ actionsTitle ]['edit ' ]['hidden ' ] =
5858 !$ this ->authorization ->isAllowed ('Magento_InventoryApi::stock_edit ' );
5959 }
6060 }
6161 }
6262
63- return $ dataSource ;
63+ return $ sourceData ;
6464 }
6565}
You can’t perform that action at this time.
0 commit comments