details = $details; $this->request = $request; $this->targetName = $targetName; } /** * {@inheritdoc} */ public function getButtonData() { $uuid = $this->request->getParam('uuid'); $details = $this->details->getDetails($uuid); if ($details['failed_retriable'] === 0) { return []; } return [ 'label' => __('Retry'), 'class' => 'retry primary', 'data_attribute' => [ 'mage-init' => ['button' => ['event' => 'save']], 'form-role' => 'save', ], ]; } }