-
Notifications
You must be signed in to change notification settings - Fork 26
/
RegistrationCertificateController.php
89 lines (78 loc) · 2.89 KB
/
RegistrationCertificateController.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
<?php
require_once 'lib/Portabilis/Controller/ReportCoreController.php';
require_once 'Reports/Reports/RegistrationCertificateReport.php';
class RegistrationCertificateController extends Portabilis_Controller_ReportCoreController
{
/**
* @var int
*/
protected $_processoAp = 999103;
/**
* @var string
*/
protected $_titulo = 'Relatório Atestado de Matrícula';
/**
* @inheritdoc
*/
protected function _preRender()
{
parent::_preRender();
Portabilis_View_Helper_Application::loadStylesheet($this, 'intranet/styles/localizacaoSistema.css');
$this->breadcrumb($this->titulo(), [
'educar_index.php' => 'Escola',
]);
}
/**
* @inheritdoc
*/
public function form()
{
$this->inputsHelper()->dynamic(['ano', 'instituicao']);
$this->inputsHelper()->dynamic(['escola'], ['required' => false]);
$this->inputsHelper()->simpleSearchMatricula('Matrícula', ['required' => false]);
$this->inputsHelper()->select('modelo', [
'label' => 'Modelo',
'resources' => [
1 => 'Modelo 1',
],
'value' => 1
]);
$this->campoMemo('observacoes', 'Observações', $this->observacao, 48, 5, false);
$this->inputsHelper()->checkbox('emitir_nome_diretor', ['label' => 'Emitir nome do diretor na assinatura']);
$this->inputsHelper()->checkbox('emitir_secretario_escolar', ['label' => 'Emitir assinatura do secretário escolar']);
}
/**
* @inheritdoc
*/
public function beforeValidation()
{
$this->report->addArg('ano', (int) $this->getRequest()->ano);
$this->report->addArg('instituicao', (int) $this->getRequest()->ref_cod_instituicao);
$this->report->addArg('escola', (int) $this->getRequest()->ref_cod_escola);
$this->report->addArg('matricula', (int) $this->getRequest()->matricula_id);
$this->report->addArg('modelo', (int) $this->getRequest()->modelo);
$this->report->addArg('cabecalho_alternativo', (int) $GLOBALS['coreExt']['Config']->report->header->alternativo);
$this->report->addArg('emitir_nome_diretor', (bool) $this->getRequest()->emitir_nome_diretor);
$this->report->addArg('emitir_secretario_escolar', (bool) $this->getRequest()->emitir_secretario_escolar);
$this->report->addArg('observacoes', (string) $this->getRequest()->observacoes);
$this->report->addArg('titulo', (string) $this->titulo());
}
/**
* @return RegistrationCertificateReport
*
* @throws Exception
*/
public function report()
{
return new RegistrationCertificateReport();
}
/**
* @return string
*/
public function titulo()
{
$obj_menu = new clsPortalMenuSubmenu(999103);
$det_menu = $obj_menu->detalhe();
return $det_menu['nm_submenu'];
}
}