clrghouz/app/Traits/PageTemplate.php

31 lines
583 B
PHP
Raw Permalink Normal View History

<?php
/**
* Template for starting a message
*/
namespace App\Traits;
use App\Classes\{ANSI,Page};
use App\Classes\Fonts\{Thick,Thin};
trait PageTemplate
{
protected function page(bool $addlogo=FALSE,string $leftbox=''): Page
{
$page = new Page;
if ($addlogo)
2023-09-18 13:12:43 +00:00
$page->addLogo(new ANSI(public_path('logo/netmail.bin')));
$header = new Thick;
$header->addText('Clearing Houz');
$page->addHeader($header,'FTN Mailer and Tosser',TRUE,0xc4);
if ($leftbox) {
$lbc = new Thin;
$lbc->addText($leftbox);
$page->addLeftBoxContent($lbc);
}
return $page;
}
}