mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-01-11 17:08:40 +00:00
Merge remote-tracking branch 'origin/develop' into develop
This commit is contained in:
commit
15d381a423
|
|
@ -22,7 +22,6 @@ use Modules\Media\Models\Media;
|
|||
use Modules\Media\Models\MediaContent;
|
||||
use Modules\Media\Models\MediaMapper;
|
||||
use Modules\Media\Models\MediaType;
|
||||
use phpOMS\Localization\BaseStringL11n;
|
||||
use Modules\Media\Models\MediaTypeL11nMapper;
|
||||
use Modules\Media\Models\MediaTypeMapper;
|
||||
use Modules\Media\Models\NullCollection;
|
||||
|
|
@ -39,6 +38,7 @@ use phpOMS\Account\PermissionType;
|
|||
use phpOMS\Application\ApplicationAbstract;
|
||||
use phpOMS\Asset\AssetType;
|
||||
use phpOMS\Autoloader;
|
||||
use phpOMS\Localization\BaseStringL11n;
|
||||
use phpOMS\Message\Http\HttpRequest;
|
||||
use phpOMS\Message\Http\HttpResponse;
|
||||
use phpOMS\Message\Http\RequestStatusCode;
|
||||
|
|
@ -1158,8 +1158,8 @@ final class ApiController extends Controller
|
|||
*/
|
||||
private function createMediaTypeL11nFromRequest(RequestAbstract $request) : BaseStringL11n
|
||||
{
|
||||
$l11nMediaType = new BaseStringL11n();
|
||||
$l11nMediaType->ref = (int) ($request->getData('type') ?? 0);
|
||||
$l11nMediaType = new BaseStringL11n();
|
||||
$l11nMediaType->ref = (int) ($request->getData('type') ?? 0);
|
||||
$l11nMediaType->content = (string) ($request->getData('title') ?? '');
|
||||
$l11nMediaType->setLanguage((string) (
|
||||
$request->getData('language') ?? $request->getLanguage()
|
||||
|
|
|
|||
|
|
@ -52,9 +52,9 @@ class MediaMapper extends DataMapperFactory
|
|||
'media_size' => ['name' => 'media_size', 'type' => 'int', 'internal' => 'size'],
|
||||
'media_source' => ['name' => 'media_source', 'type' => 'int', 'internal' => 'source'],
|
||||
'media_class' => ['name' => 'media_class', 'type' => 'int', 'internal' => 'class'],
|
||||
'media_language' => ['name' => 'media_language', 'type' => 'string', 'internal' => 'language'],
|
||||
'media_country' => ['name' => 'media_country', 'type' => 'string', 'internal' => 'country'],
|
||||
'media_unit' => ['name' => 'media_unit', 'type' => 'int', 'internal' => 'unit', 'readonly' => true],
|
||||
'media_language' => ['name' => 'media_language', 'type' => 'string', 'internal' => 'language'],
|
||||
'media_country' => ['name' => 'media_country', 'type' => 'string', 'internal' => 'country'],
|
||||
'media_unit' => ['name' => 'media_unit', 'type' => 'int', 'internal' => 'unit', 'readonly' => true],
|
||||
'media_created_by' => ['name' => 'media_created_by', 'type' => 'int', 'internal' => 'createdBy', 'readonly' => true],
|
||||
'media_created_at' => ['name' => 'media_created_at', 'type' => 'DateTimeImmutable', 'internal' => 'createdAt', 'readonly' => true],
|
||||
];
|
||||
|
|
|
|||
|
|
@ -14,8 +14,8 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\Media\Models;
|
||||
|
||||
use phpOMS\Localization\ISO639x1Enum;
|
||||
use phpOMS\Localization\BaseStringL11n;
|
||||
use phpOMS\Localization\ISO639x1Enum;
|
||||
|
||||
/**
|
||||
* Media type class.
|
||||
|
|
@ -112,8 +112,8 @@ class MediaType implements \JsonSerializable
|
|||
} elseif ($this->title instanceof BaseStringL11n) {
|
||||
$this->title->content = $title;
|
||||
} else {
|
||||
$this->title = new BaseStringL11n();
|
||||
$this->title->ref = $this->id;
|
||||
$this->title = new BaseStringL11n();
|
||||
$this->title->ref = $this->id;
|
||||
$this->title->content = $title;
|
||||
$this->title->setLanguage($lang);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@
|
|||
*/
|
||||
declare(strict_types=1);
|
||||
|
||||
use PhpOffice\PhpSpreadsheet\IOFactory;
|
||||
use PhpOffice\PhpSpreadsheet\Writer\Html;
|
||||
use phpOMS\Autoloader;
|
||||
use phpOMS\Utils\Parser\Spreadsheet\SpreadsheetParser;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user