mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-02-10 15:38:42 +00:00
phpstan, phpcs, phpunit fixes
This commit is contained in:
parent
94a0bdd106
commit
3f3d0495fe
|
|
@ -101,7 +101,7 @@ final class Installer extends InstallerAbstract
|
||||||
};
|
};
|
||||||
|
|
||||||
$apiApp->dbPool = $app->dbPool;
|
$apiApp->dbPool = $app->dbPool;
|
||||||
$apiApp->unitId = $app->unitId;
|
$apiApp->unitId = $app->unitId;
|
||||||
$apiApp->accountManager = $app->accountManager;
|
$apiApp->accountManager = $app->accountManager;
|
||||||
$apiApp->appSettings = $app->appSettings;
|
$apiApp->appSettings = $app->appSettings;
|
||||||
$apiApp->moduleManager = $app->moduleManager;
|
$apiApp->moduleManager = $app->moduleManager;
|
||||||
|
|
|
||||||
|
|
@ -535,16 +535,29 @@ final class ApiController extends Controller
|
||||||
}
|
}
|
||||||
|
|
||||||
$uploaded = $this->app->moduleManager->get('Media')->uploadFiles(
|
$uploaded = $this->app->moduleManager->get('Media')->uploadFiles(
|
||||||
$request->getDataList('names'),
|
names: $request->getDataList('names'),
|
||||||
$request->getDataList('filenames'),
|
fileNames: $request->getDataList('filenames'),
|
||||||
$uploadedFiles,
|
files: $uploadedFiles,
|
||||||
$request->header->account,
|
account: $request->header->account,
|
||||||
__DIR__ . '/../../../Modules/Media/Files/Modules/Editor/' . ($request->getData('doc') ?? '0'),
|
basePath: __DIR__ . '/../../../Modules/Media/Files/Modules/Editor/' . ($request->getData('doc') ?? '0'),
|
||||||
'/Modules/Editor/' . ($request->getData('doc') ?? '0'),
|
virtualPath: '/Modules/Editor/' . ($request->getData('doc') ?? '0'),
|
||||||
$request->getData('type', 'int'),
|
|
||||||
pathSettings: PathSettings::FILE_PATH
|
pathSettings: PathSettings::FILE_PATH
|
||||||
);
|
);
|
||||||
|
|
||||||
|
if ($request->hasData('type')) {
|
||||||
|
foreach ($uploaded as $file) {
|
||||||
|
$this->createModelRelation(
|
||||||
|
$request->header->account,
|
||||||
|
$file->getId(),
|
||||||
|
$request->getData('type', 'int'),
|
||||||
|
MediaMapper::class,
|
||||||
|
'types',
|
||||||
|
'',
|
||||||
|
$request->getOrigin()
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$this->createModelRelation(
|
$this->createModelRelation(
|
||||||
$request->header->account,
|
$request->header->account,
|
||||||
(int) $request->getData('doc'),
|
(int) $request->getData('doc'),
|
||||||
|
|
|
||||||
|
|
@ -46,7 +46,7 @@ final class EditorDocHistoryMapper extends DataMapperFactory
|
||||||
/**
|
/**
|
||||||
* Belongs to.
|
* Belongs to.
|
||||||
*
|
*
|
||||||
* @var array<string, array{mapper:string, external:string, column?:string, by?:string}>
|
* @var array<string, array{mapper:class-string, external:string, column?:string, by?:string}>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const BELONGS_TO = [
|
public const BELONGS_TO = [
|
||||||
|
|
|
||||||
|
|
@ -53,7 +53,7 @@ final class EditorDocMapper extends DataMapperFactory
|
||||||
/**
|
/**
|
||||||
* Belongs to.
|
* Belongs to.
|
||||||
*
|
*
|
||||||
* @var array<string, array{mapper:string, external:string, column?:string, by?:string}>
|
* @var array<string, array{mapper:class-string, external:string, column?:string, by?:string}>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const BELONGS_TO = [
|
public const BELONGS_TO = [
|
||||||
|
|
@ -66,7 +66,7 @@ final class EditorDocMapper extends DataMapperFactory
|
||||||
/**
|
/**
|
||||||
* Belongs to.
|
* Belongs to.
|
||||||
*
|
*
|
||||||
* @var array<string, array{mapper:string, external:string, by?:string, column?:string, conditional?:bool}>
|
* @var array<string, array{mapper:class-string, external:string, by?:string, column?:string, conditional?:bool}>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const OWNS_ONE = [
|
public const OWNS_ONE = [
|
||||||
|
|
@ -79,7 +79,7 @@ final class EditorDocMapper extends DataMapperFactory
|
||||||
/**
|
/**
|
||||||
* Has many relation.
|
* Has many relation.
|
||||||
*
|
*
|
||||||
* @var array<string, array{mapper:string, table:string, self?:?string, external?:?string, column?:string}>
|
* @var array<string, array{mapper:class-string, table:string, self?:?string, external?:?string, column?:string}>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const HAS_MANY = [
|
public const HAS_MANY = [
|
||||||
|
|
|
||||||
|
|
@ -59,7 +59,7 @@ final class EditorDocTypeL11nMapper extends DataMapperFactory
|
||||||
/**
|
/**
|
||||||
* Model to use by the mapper.
|
* Model to use by the mapper.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var class-string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const MODEL = BaseStringL11n::class;
|
public const MODEL = BaseStringL11n::class;
|
||||||
|
|
|
||||||
|
|
@ -40,7 +40,7 @@ final class EditorDocTypeMapper extends DataMapperFactory
|
||||||
/**
|
/**
|
||||||
* Has many relation.
|
* Has many relation.
|
||||||
*
|
*
|
||||||
* @var array<string, array{mapper:string, table:string, self?:?string, external?:?string, column?:string}>
|
* @var array<string, array{mapper:class-string, table:string, self?:?string, external?:?string, column?:string}>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const HAS_MANY = [
|
public const HAS_MANY = [
|
||||||
|
|
@ -57,7 +57,7 @@ final class EditorDocTypeMapper extends DataMapperFactory
|
||||||
/**
|
/**
|
||||||
* Model to use by the mapper.
|
* Model to use by the mapper.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var class-string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const MODEL = EditorDocType::class;
|
public const MODEL = EditorDocType::class;
|
||||||
|
|
|
||||||
16
Theme/Backend/Lang/api.de.lang.php
Executable file
16
Theme/Backend/Lang/api.de.lang.php
Executable file
|
|
@ -0,0 +1,16 @@
|
||||||
|
<?php
|
||||||
|
/**
|
||||||
|
* Karaka
|
||||||
|
*
|
||||||
|
* PHP Version 8.1
|
||||||
|
*
|
||||||
|
* @package Modules\Editor
|
||||||
|
* @copyright Dennis Eichhorn
|
||||||
|
* @license OMS License 1.0
|
||||||
|
* @version 1.0.0
|
||||||
|
* @link https://jingga.app
|
||||||
|
*/
|
||||||
|
declare(strict_types=1);
|
||||||
|
|
||||||
|
return ['Navigation' => [
|
||||||
|
]];
|
||||||
Loading…
Reference in New Issue
Block a user