for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* PDF view modal.
*
* @copyright YetiForce Sp. z o.o.
* @license YetiForce Public License 3.0 (licenses/LicenseEN.txt or yetiforce.com)
* @author Radosław Skrzypczak <[email protected]>
*/
namespace YF\Modules\Base\View;
* Pdf class.
class Pdf extends \App\Controller\Modal
{
/** {@inheritdoc} */
protected function getTitle()
return \App\Language::translate('LBL_AVAILABLE_PDF_TEMPLATES', $this->request->getModule());
}
protected function getModalSize()
return 'modal-md';
protected function getModalIcon(): string
return 'fas fa-file-pdf';
public function process()
$moduleName = $this->request->getModule();
$recordId = $this->request->getInteger('record');
$this->viewer->assign('TEMPLATES', \App\Pdf::getTemplates($this->moduleName, $recordId));
$this->viewer->assign('RECORD_ID', $recordId);
$this->viewer->view($this->processTplName(), $moduleName);
public function postProcessAjax()
public function processTplName(): string
return 'Modal/Pdf.tpl';