Licitator 1.0
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

35 lines
1.8 KiB

5 years ago
  1. <?php
  2. namespace Prometeo\CommandsBundle\ManualTraits;
  3. use PhpOffice\PhpWord\Element\Footer;
  4. use PhpOffice\PhpWord\SimpleType\Jc;
  5. use PhpOffice\PhpWord\SimpleType\JcTable;
  6. trait PortadaTrait
  7. {
  8. public function createPortada(&$section, &$phpword){
  9. $section->addImage(__DIR__.'/../Resources/images/headerportada.png', array('width'=>500, 'alignment' => Jc::CENTER));
  10. $section->addImage(__DIR__.'/../Resources/images/portada.png', array('width'=>500, 'alignment' => Jc::CENTER));
  11. $tableStyle = array(
  12. 'borderColor' => '9e009b',
  13. 'borderSize' => 15,
  14. 'cellMargin' => 150,
  15. 'unit' => \PhpOffice\PhpWord\SimpleType\TblWidth::PERCENT,
  16. 'width' => 100 * 50,
  17. 'alignment'=>JcTable::END
  18. );
  19. $phpword->addTableStyle('PortadaTable', $tableStyle);
  20. $table = $section->addTable('PortadaTable');
  21. $table->addRow();
  22. $table->addCell(10000)->addText('MANUAL DE USUARIO',$this->fonts['portada'], array('alignment' => Jc::END));
  23. $section->addText('<w:br/><w:br/><w:br/><w:br/><w:br/>');
  24. $section->addText('<w:br/><w:br/><w:br/><w:br/>');
  25. $section->addImage(__DIR__.'/../Resources/images/logo.png', array('width'=>200, 'alignment' => Jc::CENTER));
  26. $section->addText('PROMETEO INNOVATIONS S.L. – CIF B74.197.708', $this->fonts['footerportada'],[ 'align' => Jc::CENTER ]);
  27. $section->addText('c/Ada Byron 107 – Parque Científico y Tecnológico – 33203 Gijón, Asturias. España', $this->fonts['footerportada'],[ 'align' => Jc::CENTER ]);
  28. $section->addText('Tel :: +34 985 09 88 86 - 689 90 05 05 - mail :: prometeo@prometeoinnova.com', $this->fonts['footerportada'],[ 'align' => Jc::CENTER ]);
  29. $section->addPageBreak();
  30. }
  31. }