31 lines
936 B
PHP
31 lines
936 B
PHP
<?php
|
|
|
|
namespace Komponent\Component\Testquestions\Administrator\View\Result;
|
|
|
|
defined('_JEXEC') or die;
|
|
|
|
use Joomla\CMS\Language\Text;
|
|
use Joomla\CMS\MVC\View\HtmlView as BaseHtmlView;
|
|
use Joomla\CMS\Toolbar\ToolbarHelper;
|
|
|
|
class HtmlView extends BaseHtmlView
|
|
{
|
|
protected $item;
|
|
|
|
public function display($tpl = null)
|
|
{
|
|
$this->item = $this->get('Item');
|
|
|
|
if (!$this->item) {
|
|
throw new \RuntimeException(Text::_('COM_TESTQUESTIONS_RESULT_NOT_FOUND'));
|
|
}
|
|
|
|
ToolbarHelper::title(Text::_('COM_TESTQUESTIONS_RESULT_PREVIEW'));
|
|
ToolbarHelper::save('result.save', 'COM_TESTQUESTIONS_RESULT_SAVE');
|
|
ToolbarHelper::custom('result.save2close', 'save', 'save', 'COM_TESTQUESTIONS_RESULT_SAVE_AND_CLOSE', false);
|
|
ToolbarHelper::link('index.php?option=com_testquestions&view=results', 'COM_TESTQUESTIONS_RESULTS', 'back');
|
|
|
|
return parent::display($tpl);
|
|
}
|
|
}
|