Artifact ef852896e76bda481286df413318266d03d0e24472f48f420a3f180bca5e7e76:
- File src/include/lib/Garradin/Web/Render/EncryptedSkriv.php — part of check-in [6d5b0c3e04] at 2021-05-20 15:58:07 on branch trunk — Refactor rendering classes to use an abstract parent (user: bohwaz, size: 506) [annotate] [blame] [check-ins using]
<?php namespace Garradin\Web\Render; use Garradin\Entities\Files\File; use Garradin\Template; use const Garradin\ADMIN_URL; class EncryptedSkriv extends AbstractRender { public function render(?string $content = null, array $options = []): string { $tpl = Template::getInstance(); $file = $this->file; $content = $content ?? $file->fetch(); $tpl->assign('admin_url', ADMIN_URL); $tpl->assign(compact('file', 'content')); return $tpl->fetch('common/files/_file_render_encrypted.tpl'); } }