_title = $title; $this->_titleIcon = $titleIcon; $this->_canClose = $canClose; $this->_width = $width; // @todo this should be customizable via an option $this->_closeButtonText = __('common.closePanel'); } // // Getters and Setters // /** * Get the localized title. * @return string */ function getTitle() { return $this->_title; } /** * Get the title bar icon. * @return string */ function getTitleIcon() { return $this->_titleIcon; } /** * Whether the modal has a close icon in the title bar. * @return boolean */ function getCanClose() { return $this->_canClose; } /** * Get the width of the modal. */ function getWidth() { return $this->_width; } /** * Get the text to be displayed on the close button for screen readers */ function getCloseButtonText() { return $this->_closeButtonText; } // // Overridden methods from LinkActionRequest // /** * @see LinkActionRequest::getJSLinkActionRequest() */ function getJSLinkActionRequest() { return '$.pkp.classes.linkAction.ModalRequest'; } /** * @see LinkActionRequest::getLocalizedOptions() */ function getLocalizedOptions() { return array( 'title' => $this->getTitle(), 'titleIcon' => $this->getTitleIcon(), 'canClose' => ($this->getCanClose() ? '1' : '0'), 'width' => $this->getWidth(), 'closeButtonText' => $this->getCloseButtonText(), ); } } ?>