add file doc and fix html preview for spreadsheets

This commit is contained in:
Dennis Eichhorn 2021-08-29 14:05:25 +02:00
parent dc756961cf
commit 5019eb681b
4 changed files with 57 additions and 11 deletions

View File

@ -1,4 +1,16 @@
<?php declare(strict_types=1);
<?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package Modules\Media
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
// @todo: is this chunked/streamed output or bulk output
// if it is streamed it is not working because of ob_* in the actual response rendering

View File

@ -1,12 +1,23 @@
<?php declare(strict_types=1);
<?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package Modules\Media
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\IOFactory;
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
use PhpOffice\PhpSpreadsheet\Writer\Csv;
use phpOMS\Autoloader;
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
$media = $this->getData('media');
$reader = IOFactory::createReaderforFile(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath());

View File

@ -1,12 +1,23 @@
<?php declare(strict_types=1);
<?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package Modules\Media
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
use PhpOffice\PhpSpreadsheet\IOFactory;
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
use PhpOffice\PhpSpreadsheet\Writer\Html;
use phpOMS\Autoloader;
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
$media = $this->getData('media');
$reader = IOFactory::createReaderforFile(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath());
@ -18,4 +29,4 @@ $writer->writeAllSheets();
$writer->save('php://output');
echo '<style>body { margin: 0; } table { width: 100%; }</style>';
echo '<style>body { margin: 0; } table { width: 100%; } table .n, table .s { text-align: left; } td { padding: .5rem; }</style>';

View File

@ -1,4 +1,16 @@
<?php declare(strict_types=1);
<?php
/**
* Orange Management
*
* PHP Version 8.0
*
* @package Modules\Media
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://orange-management.org
*/
declare(strict_types=1);
use PhpOffice\PhpWord\IOFactory;
use PhpOffice\PhpWord\Writer\HTML;