Automated formatting changes

This commit is contained in:
Formatter Bot 2021-02-08 22:03:42 +00:00
parent e6bd768358
commit d106964ab6
20 changed files with 108 additions and 102 deletions

View File

@ -27,18 +27,18 @@ use Modules\Media\Models\PermissionState;
use Modules\Media\Models\UploadFile;
use Modules\Media\Models\UploadStatus;
use phpOMS\Account\PermissionType;
use phpOMS\Asset\AssetType;
use phpOMS\Message\Http\RequestStatusCode;
use phpOMS\Message\NotificationLevel;
use phpOMS\Message\RequestAbstract;
use phpOMS\Message\ResponseAbstract;
use phpOMS\Model\Html\Head;
use phpOMS\Model\Message\FormValidation;
use phpOMS\System\File\FileUtils;
use phpOMS\System\File\Local\Directory;
use phpOMS\System\MimeType;
use phpOMS\Utils\Parser\Markdown\Markdown;
use phpOMS\Views\View;
use phpOMS\System\MimeType;
use phpOMS\Model\Html\Head;
use phpOMS\Asset\AssetType;
/**
* Media class.
@ -575,7 +575,7 @@ final class ApiController extends Controller
$view->setTemplate('/Modules/Media/Theme/Api/render');
} elseif ($type === 'html') {
$head = new Head();
$css = \file_get_contents(__DIR__ . '/../../../Web/Backend/css/backend-small.css');
$css = \file_get_contents(__DIR__ . '/../../../Web/Backend/css/backend-small.css');
if ($css === false) {
$css = '';
}

View File

@ -20,9 +20,9 @@ use Modules\Media\Models\CollectionMapper;
use Modules\Media\Models\Media;
use Modules\Media\Models\MediaMapper;
use Modules\Media\Models\NullMedia;
use Modules\Media\Views\MediaView;
use Modules\Media\Theme\Backend\Components\Media\ElementView;
use Modules\Media\Theme\Backend\Components\Media\ListView;
use Modules\Media\Views\MediaView;
use phpOMS\Contract\RenderableInterface;
use phpOMS\Message\RequestAbstract;
use phpOMS\Message\ResponseAbstract;
@ -178,7 +178,7 @@ final class BackendController extends Controller
$id = $request->getData('id', 'int');
if ($id === 0) {
$path = \urldecode($request->getData('path'));
$path = \urldecode($request->getData('path'));
$media = new NullMedia();
if (\is_file(__DIR__ . '/../Files' . $path)) {
$name = \explode('.', \basename($path));
@ -227,7 +227,7 @@ final class BackendController extends Controller
/**
* Create media view
*
* @param Media $media Media
* @param Media $media Media
*
* @return View
*

View File

@ -1,4 +1,4 @@
<?php
<?php 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,11 +1,11 @@
<?php declare(strict_types=1);
use phpOMS\Autoloader;
use PhpOffice\PhpSpreadsheet\IOFactory;
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Writer\Csv;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use phpOMS\Autoloader;
$media = $this->getData('media');

View File

@ -1,11 +1,11 @@
<?php declare(strict_types=1);
use phpOMS\Autoloader;
use PhpOffice\PhpSpreadsheet\IOFactory;
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Writer\Html;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use phpOMS\Autoloader;
$media = $this->getData('media');

View File

@ -1,16 +1,16 @@
<?php declare(strict_types=1);
use phpOMS\Autoloader;
use PhpOffice\PhpWord\IOFactory;
Autoloader::addPath(__DIR__ . '/../../../../Resources/');
use PhpOffice\PhpWord\IOFactory;
use PhpOffice\PhpWord\Writer\HTML;
use PhpOffice\PhpWord\PhpWord;
use phpOMS\Autoloader;
$media = $this->getData('media');
$reader = IOFactory::createReader('Word2007');
$doc = $reader->load(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath());
$doc = $reader->load(($media->isAbsolute ? '' : __DIR__ . '/../../../../') . $media->getPath());
$writer = new HTML($doc);

View File

@ -14,11 +14,11 @@ declare(strict_types=1);
namespace Modules\Media\Theme\Backend\Components\Media;
use Modules\Media\Models\Media;
use Modules\Media\Views\MediaView;
use phpOMS\Localization\L11nManager;
use phpOMS\Message\RequestAbstract;
use phpOMS\Message\ResponseAbstract;
use Modules\Media\Views\MediaView;
use Modules\Media\Models\Media;
/**
* Component view.

View File

@ -1,6 +1,7 @@
<?php
<?php declare(strict_types=1);
use phpOMS\Uri\UriFactory;
?>
<section id="mediaFile" class="portlet">
<div class="portlet-body">

View File

@ -1,6 +1,7 @@
<?php
<?php declare(strict_types=1);
use phpOMS\Utils\IO\Csv\CsvSettings;
?>
<section id="mediaFile" class="portlet">
<div class="portlet-body">

View File

@ -1,6 +1,7 @@
<?php
<?php declare(strict_types=1);
use phpOMS\Uri\UriFactory;
?>
<section id="mediaFile" class="portlet">
<div class="portlet-body">

View File

@ -1,4 +1,4 @@
<?php
<?php declare(strict_types=1);
$array = \json_decode($this->getFileContent(($this->media->isAbsolute ? '' : __DIR__ . '/../../../../../../') . $this->media->getPath()), true);
?>

View File

@ -1,6 +1,7 @@
<?php
<?php declare(strict_types=1);
use phpOMS\Utils\Parser\Markdown\Markdown;
?>
<section id="mediaFile" class="portlet">
<div class="portlet-body">

View File

@ -13,6 +13,7 @@
declare(strict_types=1);
use \phpOMS\Uri\UriFactory;
?>
<section id="mediaFile" class="portlet">

View File

@ -1,13 +1,13 @@
<?php declare(strict_types=1);
use phpOMS\Autoloader;
use PhpOffice\PhpPresentation\IOFactory;
Autoloader::addPath(__DIR__ . '/../../../../../../Resources/');
use PhpOffice\PhpPresentation\IOFactory;
use PhpOffice\PhpPresentation\Writer\Html;
use PhpOffice\PhpPresentation\Spreadsheet;
use phpOMS\Autoloader;
$reader = IOFactory::createReader('PowerPoint2007');
$reader = IOFactory::createReader('PowerPoint2007');
$presentation = $reader->load(($this->media->isAbsolute ? '' : __DIR__ . '/../../../../../../') . $this->media->getPath());
$writer = new Html($presentation);

View File

@ -1,14 +1,13 @@
<?php declare(strict_types=1);
use phpOMS\Autoloader;
use PhpOffice\PhpSpreadsheet\IOFactory;
Autoloader::addPath(__DIR__ . '/../../../../../../Resources/');
use PhpOffice\PhpSpreadsheet\IOFactory;
use PhpOffice\PhpSpreadsheet\Writer\Csv;
use PhpOffice\PhpSpreadsheet\Spreadsheet;
use phpOMS\Autoloader;
use phpOMS\Uri\UriFactory;
use phpOMS\Utils\IO\Csv\CsvSettings;
?>
<section id="mediaFile" class="portlet">
<div class="portlet-body">
@ -38,7 +37,7 @@ use phpOMS\Utils\IO\Csv\CsvSettings;
\ob_start();
$writer->save('php://output');
$data = \ob_get_clean();
$csv = \explode("\n", \trim($data, "\n"));
$csv = \explode("\n", \trim($data, "\n"));
?>
<table class="default">
<?php

View File

@ -1,6 +1,7 @@
<?php
<?php declare(strict_types=1);
use phpOMS\Uri\UriFactory;
?>
<section id="mediaFile" class="portlet">
<div class="portlet-body">

View File

@ -1,6 +1,7 @@
<?php
<?php declare(strict_types=1);
use phpOMS\Uri\UriFactory;
?>
<section id="mediaFile" class="portlet">
<div class="portlet-body">

View File

@ -12,37 +12,37 @@
declare(strict_types=1);
return ['Media' => [
'Account' => 'Account',
'AddToCollection' => 'Zum Ordner hinzufügen',
'Author' => 'Autor',
'Back' => 'Zurück',
'Changed' => 'Geändert',
'Changedby' => 'Geändert by',
'Created' => 'Erstellt',
'Account' => 'Account',
'AddToCollection' => 'Zum Ordner hinzufügen',
'Author' => 'Autor',
'Back' => 'Zurück',
'Changed' => 'Geändert',
'Changedby' => 'Geändert by',
'Created' => 'Erstellt',
'CreateCollection' => 'Erstelle Ordner',
'CreateFile' => 'Erstelle Datei',
'Creator' => 'Ersteller',
'Data' => 'Daten',
'Description' => 'Beschreibung',
'Edit' => 'Bearbeiten',
'Editability' => 'Bearbeitung',
'Extension' => 'Endung',
'FilePath' => 'Dateipfad',
'Files' => 'Dateien',
'Media' => 'Media',
'Name' => 'Name',
'Path' => 'Pfad',
'PathSettings' => 'Pfad Einstellung',
'Permission' => 'Rechte',
'Preview' => 'Vorschau',
'RandomPath' => 'Zufälliger Pfad',
'Select' => 'Auswahl',
'Settings' => 'Einstellungen',
'Size' => 'Größe',
'Type' => 'Typ',
'Upload' => 'Hochladen',
'VirtualPath' => 'Virtueller Pfad',
'Visibility' => 'Sichtbarkeit',
'GroupUser' => '',
'Add' => '',
'CreateFile' => 'Erstelle Datei',
'Creator' => 'Ersteller',
'Data' => 'Daten',
'Description' => 'Beschreibung',
'Edit' => 'Bearbeiten',
'Editability' => 'Bearbeitung',
'Extension' => 'Endung',
'FilePath' => 'Dateipfad',
'Files' => 'Dateien',
'Media' => 'Media',
'Name' => 'Name',
'Path' => 'Pfad',
'PathSettings' => 'Pfad Einstellung',
'Permission' => 'Rechte',
'Preview' => 'Vorschau',
'RandomPath' => 'Zufälliger Pfad',
'Select' => 'Auswahl',
'Settings' => 'Einstellungen',
'Size' => 'Größe',
'Type' => 'Typ',
'Upload' => 'Hochladen',
'VirtualPath' => 'Virtueller Pfad',
'Visibility' => 'Sichtbarkeit',
'GroupUser' => '',
'Add' => '',
]];

View File

@ -12,37 +12,37 @@
declare(strict_types=1);
return ['Media' => [
'Account' => 'Account',
'AddToCollection' => 'Add to collection',
'Author' => 'Author',
'Back' => 'Back',
'Changed' => 'Changed',
'Changedby' => 'Changed by',
'Created' => 'Created',
'Account' => 'Account',
'AddToCollection' => 'Add to collection',
'Author' => 'Author',
'Back' => 'Back',
'Changed' => 'Changed',
'Changedby' => 'Changed by',
'Created' => 'Created',
'CreateCollection' => 'Create Collection',
'CreateFile' => 'Create File',
'Creator' => 'Creator',
'Data' => 'Data',
'Description' => 'Description',
'Edit' => 'Edit',
'Editability' => 'Editability',
'Extension' => 'Extension',
'FilePath' => 'File Path',
'Files' => 'Files',
'Media' => 'Media',
'Name' => 'Name',
'Path' => 'Path',
'PathSettings' => 'Path Settings',
'Permission' => 'Permission',
'Preview' => 'Preview',
'RandomPath' => 'Random Path',
'Select' => 'Select',
'Settings' => 'Settings',
'Size' => 'Size',
'Type' => 'Type',
'Upload' => 'Upload',
'VirtualPath' => 'Virtual Path',
'Visibility' => 'Visibility',
'GroupUser' => '',
'Add' => '',
'CreateFile' => 'Create File',
'Creator' => 'Creator',
'Data' => 'Data',
'Description' => 'Description',
'Edit' => 'Edit',
'Editability' => 'Editability',
'Extension' => 'Extension',
'FilePath' => 'File Path',
'Files' => 'Files',
'Media' => 'Media',
'Name' => 'Name',
'Path' => 'Path',
'PathSettings' => 'Path Settings',
'Permission' => 'Permission',
'Preview' => 'Preview',
'RandomPath' => 'Random Path',
'Select' => 'Select',
'Settings' => 'Settings',
'Size' => 'Size',
'Type' => 'Type',
'Upload' => 'Upload',
'VirtualPath' => 'Virtual Path',
'Visibility' => 'Visibility',
'GroupUser' => '',
'Add' => '',
]];

View File

@ -22,7 +22,7 @@ include __DIR__ . '/template-functions.php';
/** @var \Modules\Media\Models\Media $media */
$media = $this->getData('media');
$view = $this->getData('view');
$view = $this->getData('view');
/** @var \Modules\Media\Views\MediaView $this */
echo $this->getData('nav')->render();