_title = $title; $this->_titleIcon = $titleIcon; $this->_canClose = $canClose; $this->_closeOnFormSuccessId = $closeOnFormSuccessId; $this->_closeCleanVueInstances = $closeCleanVueInstances; // @todo this should be customizable via an option $this->_closeButtonText = __('common.closePanel'); } // // Getters and Setters // /** * Get the localized title. * * @return string */ public function getTitle() { return $this->_title; } /** * Get the title bar icon. * * @return string */ public function getTitleIcon() { return $this->_titleIcon; } /** * Whether the modal has a close icon in the title bar. * * @return bool */ public function getCanClose() { return $this->_canClose; } /** * Get the text to be displayed on the close button for screen readers */ public function getCloseButtonText() { return $this->_closeButtonText; } // // Overridden methods from LinkActionRequest // /** * @see LinkActionRequest::getJSLinkActionRequest() */ public function getJSLinkActionRequest() { return '$.pkp.classes.linkAction.ModalRequest'; } /** * @see LinkActionRequest::getLocalizedOptions() */ public function getLocalizedOptions() { return [ 'title' => $this->getTitle(), 'titleIcon' => $this->getTitleIcon(), 'canClose' => ($this->getCanClose() ? '1' : '0'), 'closeOnFormSuccessId' => $this->_closeOnFormSuccessId, 'closeCleanVueInstances' => $this->_closeCleanVueInstances, 'closeButtonText' => $this->getCloseButtonText(), ]; } } if (!PKP_STRICT_MODE) { class_alias('\PKP\linkAction\request\Modal', '\Modal'); }