D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
var
/
www
/
html
/
idoso
/
adm
/
app
/
gre
/
Controllers
/
Filename :
EstruturaFornServico.php
back
Copy
<?php namespace App\gre\Controllers; if (!defined('URL')) { header("Location: /"); exit(); } /** * Description of EstruturaFornServico * * @copyright (c) year, Carlos Marques - CM */ class EstruturaFornServico { private $Dados; private $DadosForm; private $PageId; public function listar($PageId = null) { $botao = ['list_estrut_forn_serv' => ['menu_controller' => 'estrutura-forn-servico', 'menu_metodo' => 'listar'], 'cad_estrut_forn_serv' => ['menu_controller' => 'cadastrar-estrutura-forn-servico', 'menu_metodo' => 'cad-estrut-forn-serv'], 'vis_estrut_forn_serv' => ['menu_controller' => 'ver-estrutura-forn-servico', 'menu_metodo' => 'ver-estrut-forn-serv'], 'del_estrut_forn_serv' => ['menu_controller' => 'apagar-estrutura-forn-servico', 'menu_metodo' => 'apagar-estrut-forn-serv']]; $listarBotao = new \App\adms\Models\AdmsBotao(); $this->Dados['botao'] = $listarBotao->valBotao($botao); $listarMenu = new \App\adms\Models\AdmsMenu(); $this->Dados['menu'] = $listarMenu->itemMenu(); $this->cadEstrutViewPriv(); $this->DadosForm = filter_input_array(INPUT_POST, FILTER_DEFAULT); if (!empty($this->DadosForm['ListEstrutFornServ'])) { unset($this->DadosForm['ListEstrutFornServ']); } else { $this->PageId = (int) $PageId ? $PageId : 1; $this->DadosForm['nome_unid'] = filter_input(INPUT_GET, 'nome_unid', FILTER_DEFAULT); $this->DadosForm['unid_nome'] = filter_input(INPUT_GET, 'unid_nome', FILTER_DEFAULT); } $listarEstrutFornServ = new \App\gre\Models\GreListarEstruturaFornServico(); $this->Dados['listEstrutFornServ'] = $listarEstrutFornServ->listarEstrutFornServ($this->PageId, $this->DadosForm); $this->Dados['paginacao'] = $listarEstrutFornServ->getResultadoPg(); $carregarView = new \App\gre\core\ConfigView("gre/Views/Fornecedor_Servico/listarEstruturaFornServico", $this->Dados); $carregarView->renderizarGre(); } private function cadEstrutViewPriv() { $listarSelect = new \App\gre\Models\GreListarEstruturaFornServico(); $this->Dados['select'] = $listarSelect->listarCadastrar(); } }