<?php

defined('BASEPATH') or exit('No direct script access allowed');

// Load Perfex core PDF base class
require_once(APPPATH . 'libraries/pdf/App_pdf.php');

class Staff_declaration_pdf extends App_pdf
{
    protected $decl;

    public function __construct($decl)
    {
        $this->decl = $decl;

        parent::__construct();

        //$staffName = is_object($decl) ? ($decl->staff_name ?? '') : '';
        //$this->SetTitle('Gift Disclosure - ' . $staffName);
    }

    public function prepare()
    {
        $this->set_view_vars('decl', $this->decl);
        return $this->build();
    }

    protected function type()
    {
        return 'staff_declaration';
    }

    protected function file_path()
    {
        return module_views_path('staff_declaration', 'pdf_template.php');
    }
}
