mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-01-27 16:28:40 +00:00
Automated formatting changes
This commit is contained in:
parent
8bb872ecdf
commit
851498c51b
|
|
@ -33,8 +33,12 @@ use Modules\Media\Models\PermissionCategory;
|
|||
use Modules\Media\Models\UploadFile;
|
||||
use Modules\Media\Models\UploadStatus;
|
||||
use Modules\Tag\Models\NullTag;
|
||||
use PhpOffice\PhpWord\IOFactory;
|
||||
use PhpOffice\PhpWord\Writer\HTML;
|
||||
use phpOMS\Account\PermissionType;
|
||||
use phpOMS\Application\ApplicationAbstract;
|
||||
use phpOMS\Asset\AssetType;
|
||||
use phpOMS\Autoloader;
|
||||
use phpOMS\Message\Http\HttpRequest;
|
||||
use phpOMS\Message\Http\HttpResponse;
|
||||
use phpOMS\Message\Http\RequestStatusCode;
|
||||
|
|
@ -47,12 +51,8 @@ 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 PhpOffice\PhpWord\IOFactory;
|
||||
use PhpOffice\PhpWord\Writer\HTML;
|
||||
use phpOMS\Application\ApplicationAbstract;
|
||||
use phpOMS\Autoloader;
|
||||
use phpOMS\Utils\Parser\Pdf\PdfParser;
|
||||
use phpOMS\Views\View;
|
||||
|
||||
/**
|
||||
* Media class.
|
||||
|
|
@ -346,7 +346,7 @@ final class ApiController extends Controller
|
|||
return $contents === false ? '' : $contents;
|
||||
default:
|
||||
return '';
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -931,7 +931,7 @@ final class ApiController extends Controller
|
|||
$this->fillJsonResponse($request, $response, NotificationLevel::OK, 'Media', 'Media type successfully created', $type);
|
||||
}
|
||||
|
||||
/**
|
||||
/**
|
||||
* Method to create task from request.
|
||||
*
|
||||
* @param RequestAbstract $request Request
|
||||
|
|
|
|||
|
|
@ -23,8 +23,8 @@ use Modules\Media\Models\CollectionMapper;
|
|||
use Modules\Media\Models\Media;
|
||||
use Modules\Media\Models\MediaClass;
|
||||
use Modules\Media\Models\MediaMapper;
|
||||
use Modules\Media\Models\MediaTypeMapper;
|
||||
use Modules\Media\Models\MediaTypeL11nMapper;
|
||||
use Modules\Media\Models\MediaTypeMapper;
|
||||
use Modules\Media\Models\NullCollection;
|
||||
use Modules\Media\Models\NullMedia;
|
||||
use Modules\Media\Models\PermissionCategory;
|
||||
|
|
|
|||
|
|
@ -14,11 +14,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\Media\Models;
|
||||
|
||||
use Modules\Admin\Models\Account;
|
||||
use Modules\Admin\Models\NullAccount;
|
||||
use Modules\Tag\Models\NullTag;
|
||||
use Modules\Tag\Models\Tag;
|
||||
|
||||
/**
|
||||
* Media class.
|
||||
*
|
||||
|
|
@ -55,7 +50,7 @@ class MediaContent implements \JsonSerializable
|
|||
public function toArray() : array
|
||||
{
|
||||
return [
|
||||
'id' => $this->id,
|
||||
'id' => $this->id,
|
||||
'content' => $this->content,
|
||||
];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -41,7 +41,7 @@ class MediaMapper extends DataMapperFactory
|
|||
'media_type' => ['name' => 'media_type', 'type' => 'int', 'internal' => 'type'],
|
||||
'media_description' => ['name' => 'media_description', 'type' => 'string', 'internal' => 'description', 'autocomplete' => true],
|
||||
'media_description_raw' => ['name' => 'media_description_raw', 'type' => 'string', 'internal' => 'descriptionRaw'],
|
||||
'media_content' => ['name' => 'media_content', 'type' => 'int', 'internal' => 'content'],
|
||||
'media_content' => ['name' => 'media_content', 'type' => 'int', 'internal' => 'content'],
|
||||
'media_versioned' => ['name' => 'media_versioned', 'type' => 'bool', 'internal' => 'isVersioned'],
|
||||
'media_status' => ['name' => 'media_status', 'type' => 'bool', 'internal' => 'status'],
|
||||
'media_file' => ['name' => 'media_file', 'type' => 'string', 'internal' => 'path', 'autocomplete' => true],
|
||||
|
|
@ -51,8 +51,8 @@ class MediaMapper extends DataMapperFactory
|
|||
'media_password' => ['name' => 'media_password', 'type' => 'string', 'internal' => 'password'],
|
||||
'media_extension' => ['name' => 'media_extension', 'type' => 'string', 'internal' => 'extension'],
|
||||
'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_source' => ['name' => 'media_source', 'type' => 'int', 'internal' => 'source'],
|
||||
'media_class' => ['name' => 'media_class', 'type' => 'int', 'internal' => 'class'],
|
||||
'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,9 +14,6 @@ declare(strict_types=1);
|
|||
|
||||
namespace Modules\Media\Models;
|
||||
|
||||
use Modules\Admin\Models\Account;
|
||||
use phpOMS\DataStorage\Database\Mapper\ReadMapper;
|
||||
|
||||
/**
|
||||
* Mapper class.
|
||||
*
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ $mediaPath = \urldecode($this->getData('path') ?? '/');
|
|||
$media = $this->getData('media') ?? [];
|
||||
|
||||
/** @var \Modules\Admin\Models\Account $account */
|
||||
$account = $this->getData('account');
|
||||
$account = $this->getData('account');
|
||||
$accountDir = $account->getId() . ' ' . $account->login;
|
||||
|
||||
$previous = empty($media) ? '{/prefix}media/list' : '{/prefix}media/list?{?}&id=' . \reset($media)->getId() . '&ptype=p';
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ $view = $this->getData('view');
|
|||
$tags = $media->getTags();
|
||||
|
||||
/** @var \Modules\Admin\Models\Account $account */
|
||||
$account = $this->getData('account');
|
||||
$account = $this->getData('account');
|
||||
$accountDir = $account->getId() . ' ' . $account->login;
|
||||
|
||||
$mediaPath = \urldecode($media->getVirtualPath() ?? '/');
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user