123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141 |
- <?php
- namespace pdf\controllers;
- use app\models\OficialiaPartesManifiestoDocumento;
- use pdf\web\Controller;
- use v1\models\Aclaracion;
- use v1\models\FondoLegislativo;
- use v1\models\OficialiaPartesDocumento;
- use v1\models\OficialiaPartesDocumentoResponsable;
- use v1\models\OficialiaPartesManifiesto;
- use v1\models\RequisicionResponsable;
- use v1\models\Usuario;
- use yii\web\HttpException;
- use yii\web\NotFoundHttpException;
- class RequerimientoAclaracionController extends Controller {
- public function actionIndex() {
- }
- public function actionFormato() {
- //$request = \Yii::$app->request;
- $configuracion = [
- 'mode' => 'utf-8',
- 'format' => 'letter',
- 'margin_top' => '36',
- ];
- $view = new \yii\web\View();
- $htmlPDF = $view->render("@app/modules/pdf/views/requerimiento-aclaracion/formato", [
- "recursoRevision" => [],
- ]);
- $header = $view->render("@app/modules/pdf/views/header/formato", [
- "titulo" => "ACUSE DE SOLICITUD DE INFORMACIÓN PÚBLICA",
- ]);
- $pdf = self::crearPDF(
- 'RA-ISTAIAS-02',
- $htmlPDF,
- $configuracion,
- false,
- $header,
- '',
- ''
- );
- }
- public function actionRespuesta() {
- $idAclaracion = trim($this->req->get('aclaracion', ''));
- $aclaracion = null;
- if ($idAclaracion === '') {
- throw new HttpException(400, 'Es necesario proporcionar un ID de aclaración.');
- }
- $aclaracion = Aclaracion::find()
- ->andWhere(["id" => $idAclaracion])
- ->andWhere(['eliminado' => null])
- ->with('solicitud', 'media')
- ->one();
- if ($aclaracion === null) {
- throw new NotFoundHttpException('No se encontró la aclaración.');
- }
- $solicitante = Usuario::find()
- ->andWhere(['id' => $aclaracion->idSolicitaAclaracion])
- ->andWhere(['eliminado' => null])
- ->one();
- $configuracion = [
- 'mode' => 'utf-8',
- 'format' => 'letter',
- 'margin_top' => '36',
- ];
- $view = new \yii\web\View();
- $htmlPDF = $view->render("@app/modules/pdf/views/requerimiento-aclaracion/respuesta", [
- "aclaracion" => $aclaracion,
- "solicitante" => $solicitante
- ]);
- $header = $view->render("@app/modules/pdf/views/header/formato", [
- "titulo" => "RESPUESTA DE REQUERIMIENTO DE ACLARACIÓN",
- ]);
- $pdf = self::crearPDF(
- 'RA-ISTAIAS-06',
- $htmlPDF,
- $configuracion,
- false,
- $header,
- '',
- ''
- );
- }
- public function actionOficio() {
- $request = \Yii::$app->request;
- $configuracion = [
- 'mode' => 'utf-8',
- 'format' => 'letter',
- 'margin_top' => '50',
- ];
- $view = new \yii\web\View();
- $htmlPDF = $view->render("@app/modules/pdf/views/requerimiento-aclaracion/oficio", [
- "recursoRevision" => [],
- ]);
- if ($request->get('header'))
- $header = $view->render("@app/modules/pdf/views/header/oficio-landing", [
- "titulo" => "ACUSE DE SOLICITUD DE INFORMACIÓN PÚBLICA",
- ]);
- else
- $header = $view->render("@app/modules/pdf/views/header/oficio", [
- "titulo" => "ACUSE DE SOLICITUD DE INFORMACIÓN PÚBLICA",
- ]);
- $pdf = self::crearPDF(
- 'AS-ISTAIAS-03',
- $htmlPDF,
- $configuracion,
- false,
- $header,
- '',
- ''
- );
- }
- }
|