@@ -77,9 +77,9 @@ protected function _construct()
7777
7878 parent ::_construct ();
7979
80- $ this ->buttonList -> remove ('delete ' );
81- $ this ->buttonList -> remove ('reset ' );
82- $ this ->buttonList -> remove ('save ' );
80+ $ this ->removeButton ('delete ' );
81+ $ this ->removeButton ('reset ' );
82+ $ this ->removeButton ('save ' );
8383 $ this ->setId ('sales_order_view ' );
8484 $ order = $ this ->getOrder ();
8585
@@ -92,7 +92,7 @@ protected function _construct()
9292 . $ this ->getEditMessage ($ order ) . '\', url: \'' . $ this ->getEditUrl ()
9393 . '\'}).orderEditDialog( \'showDialog \'); ' ;
9494
95- $ this ->buttonList -> add (
95+ $ this ->addButton (
9696 'order_edit ' ,
9797 [
9898 'label ' => __ ('Edit ' ),
@@ -106,7 +106,7 @@ protected function _construct()
106106 }
107107
108108 if ($ this ->_isAllowedAction ('Magento_Sales::cancel ' ) && $ order ->canCancel ()) {
109- $ this ->buttonList -> add (
109+ $ this ->addButton (
110110 'order_cancel ' ,
111111 [
112112 'label ' => __ ('Cancel ' ),
@@ -140,7 +140,7 @@ protected function _construct()
140140 if ($ order ->getPayment ()->getMethodInstance ()->isGateway ()) {
141141 $ onClick = "confirmSetLocation(' {$ message }', ' {$ this ->getCreditmemoUrl ()}') " ;
142142 }
143- $ this ->buttonList -> add (
143+ $ this ->addButton (
144144 'order_creditmemo ' ,
145145 ['label ' => __ ('Credit Memo ' ), 'onclick ' => $ onClick , 'class ' => 'credit-memo ' ]
146146 );
@@ -159,7 +159,7 @@ protected function _construct()
159159 }
160160
161161 if ($ this ->_isAllowedAction ('Magento_Sales::hold ' ) && $ order ->canHold ()) {
162- $ this ->buttonList -> add (
162+ $ this ->addButton (
163163 'order_hold ' ,
164164 [
165165 'label ' => __ ('Hold ' ),
@@ -173,7 +173,7 @@ protected function _construct()
173173 }
174174
175175 if ($ this ->_isAllowedAction ('Magento_Sales::unhold ' ) && $ order ->canUnhold ()) {
176- $ this ->buttonList -> add (
176+ $ this ->addButton (
177177 'order_unhold ' ,
178178 [
179179 'label ' => __ ('Unhold ' ),
@@ -189,15 +189,15 @@ protected function _construct()
189189 if ($ this ->_isAllowedAction ('Magento_Sales::review_payment ' )) {
190190 if ($ order ->canReviewPayment ()) {
191191 $ message = __ ('Are you sure you want to accept this payment? ' );
192- $ this ->buttonList -> add (
192+ $ this ->addButton (
193193 'accept_payment ' ,
194194 [
195195 'label ' => __ ('Accept Payment ' ),
196196 'onclick ' => "confirmSetLocation(' {$ message }', ' {$ this ->getReviewPaymentUrl ('accept ' )}') "
197197 ]
198198 );
199199 $ message = __ ('Are you sure you want to deny this payment? ' );
200- $ this ->buttonList -> add (
200+ $ this ->addButton (
201201 'deny_payment ' ,
202202 [
203203 'label ' => __ ('Deny Payment ' ),
@@ -206,7 +206,7 @@ protected function _construct()
206206 );
207207 }
208208 if ($ order ->canFetchPaymentReviewUpdate ()) {
209- $ this ->buttonList -> add (
209+ $ this ->addButton (
210210 'get_review_payment_update ' ,
211211 [
212212 'label ' => __ ('Get Payment Update ' ),
@@ -218,7 +218,7 @@ protected function _construct()
218218
219219 if ($ this ->_isAllowedAction ('Magento_Sales::invoice ' ) && $ order ->canInvoice ()) {
220220 $ _label = $ order ->getForcedShipmentWithInvoice () ? __ ('Invoice and Ship ' ) : __ ('Invoice ' );
221- $ this ->buttonList -> add (
221+ $ this ->addButton (
222222 'order_invoice ' ,
223223 [
224224 'label ' => $ _label ,
@@ -232,7 +232,7 @@ protected function _construct()
232232 'Magento_Sales::ship '
233233 ) && $ order ->canShip () && !$ order ->getForcedShipmentWithInvoice ()
234234 ) {
235- $ this ->buttonList -> add (
235+ $ this ->addButton (
236236 'order_ship ' ,
237237 [
238238 'label ' => __ ('Ship ' ),
@@ -248,7 +248,7 @@ protected function _construct()
248248 $ order ->getStore ()
249249 ) && $ order ->canReorderIgnoreSalable ()
250250 ) {
251- $ this ->buttonList -> add (
251+ $ this ->addButton (
252252 'order_reorder ' ,
253253 [
254254 'label ' => __ ('Reorder ' ),
0 commit comments