IncompetenciaSujetoController.php 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137
  1. <?php
  2. namespace pdf\controllers;
  3. use app\models\OficialiaPartesManifiestoDocumento;
  4. use pdf\web\Controller;
  5. use v1\models\FondoLegislativo;
  6. use v1\models\OficialiaPartesDocumento;
  7. use v1\models\OficialiaPartesDocumentoResponsable;
  8. use v1\models\OficialiaPartesManifiesto;
  9. use v1\models\RequisicionResponsable;
  10. use v1\models\Solicitud;
  11. use v1\models\Usuario;
  12. class IncompetenciaSujetoController extends Controller {
  13. public function actionIndex() {
  14. $idSolicitud = trim($this->req->get('solicitud', ''));
  15. $solicitud = null;
  16. if ($idSolicitud === '') {
  17. throw new \yii\web\NotFoundHttpException("No se encontró la solicitud");
  18. }
  19. $solicitud = Solicitud::find()
  20. ->andWhere(['id' => $idSolicitud])
  21. ->andWhere(['eliminado' => null])
  22. ->one();
  23. if ($solicitud === null) {
  24. throw new \yii\web\NotFoundHttpException("No se encontró la solicitud");
  25. }
  26. $request = \Yii::$app->request;
  27. $configuracion = [
  28. 'mode' => 'utf-8',
  29. 'format' => 'letter',
  30. 'margin_top' => '50',
  31. ];
  32. $view = new \yii\web\View();
  33. $htmlPDF = $view->render("@app/modules/pdf/views/incompetencia-sujeto/oficio", [
  34. "solicitud" => $solicitud,
  35. "recursoRevision" => [],
  36. ]);
  37. if ($request->get('header'))
  38. $header = $view->render("@app/modules/pdf/views/header/oficio-landing", [
  39. "titulo" => "ACUSE DE SOLICITUD DE INFORMACIÓN PÚBLICA",
  40. ]);
  41. else
  42. $header = $view->render("@app/modules/pdf/views/header/oficio", [
  43. "titulo" => "ACUSE DE SOLICITUD DE INFORMACIÓN PÚBLICA",
  44. ]);
  45. $pdf = self::crearPDF(
  46. 'AS-ISTAIAS-03',
  47. $htmlPDF,
  48. $configuracion,
  49. false,
  50. $header,
  51. '',
  52. ''
  53. );
  54. }
  55. public function actionFormato() {
  56. //$request = \Yii::$app->request;
  57. $configuracion = [
  58. 'mode' => 'utf-8',
  59. 'format' => 'letter',
  60. 'margin_top' => '36',
  61. ];
  62. $view = new \yii\web\View();
  63. $htmlPDF = $view->render("@app/modules/pdf/views/requerimiento-aclaracion/formato", [
  64. "recursoRevision" => [],
  65. ]);
  66. $header = $view->render("@app/modules/pdf/views/header/formato", [
  67. "titulo" => "ACUSE DE SOLICITUD DE INFORMACIÓN PÚBLICA",
  68. ]);
  69. $pdf = self::crearPDF(
  70. 'RA-ISTAIAS-02',
  71. $htmlPDF,
  72. $configuracion,
  73. false,
  74. $header,
  75. '',
  76. ''
  77. );
  78. }
  79. public function actionOficio() {
  80. $request = \Yii::$app->request;
  81. $configuracion = [
  82. 'mode' => 'utf-8',
  83. 'format' => 'letter',
  84. 'margin_top' => '50',
  85. ];
  86. $view = new \yii\web\View();
  87. $htmlPDF = $view->render("@app/modules/pdf/views/requerimiento-aclaracion/oficio", [
  88. "recursoRevision" => [],
  89. ]);
  90. if ($request->get('header'))
  91. $header = $view->render("@app/modules/pdf/views/header/oficio-landing", [
  92. "titulo" => "ACUSE DE SOLICITUD DE INFORMACIÓN PÚBLICA",
  93. ]);
  94. else
  95. $header = $view->render("@app/modules/pdf/views/header/oficio", [
  96. "titulo" => "ACUSE DE SOLICITUD DE INFORMACIÓN PÚBLICA",
  97. ]);
  98. $pdf = self::crearPDF(
  99. 'AS-ISTAIAS-03',
  100. $htmlPDF,
  101. $configuracion,
  102. false,
  103. $header,
  104. '',
  105. ''
  106. );
  107. }
  108. }