_okButton = (is_null($okButton) ? __('common.ok') : $okButton); $this->_cancelButton = (is_null($cancelButton) ? __('common.cancel') : $cancelButton); $this->_dialogText = $dialogText; } // // Getters and Setters // /** * Get the translation key for the confirmation * button text. * * @return string */ public function getOkButton() { return $this->_okButton; } /** * Get the translation key for the cancel * button text. * * @return string */ public function getCancelButton() { return $this->_cancelButton; } /** * Get the translation key for the dialog * text. * * @return string */ public function getDialogText() { return $this->_dialogText; } // // Overridden methods from LinkActionRequest // /** * @see LinkActionRequest::getLocalizedOptions() */ public function getLocalizedOptions() { return array_merge(parent::getLocalizedOptions(), [ 'modalHandler' => '$.pkp.controllers.modal.ConfirmationModalHandler', 'okButton' => $this->getOkButton(), 'cancelButton' => $this->getCancelButton(), 'dialogText' => $this->getDialogText()]); } } if (!PKP_STRICT_MODE) { class_alias('\PKP\linkAction\request\ConfirmationModal', '\ConfirmationModal'); }