mirror of
https://github.com/Karaka-Management/oms-Media.git
synced 2026-02-16 09:18:42 +00:00
doc fixes
This commit is contained in:
parent
ec7d3b8142
commit
ded124082d
|
|
@ -65,6 +65,7 @@ final class Installer extends InstallerAbstract
|
||||||
// However, the admin account is created before the Media module is installed
|
// However, the admin account is created before the Media module is installed
|
||||||
// Because of this, the directory needs to be created manually after the Media installation
|
// Because of this, the directory needs to be created manually after the Media installation
|
||||||
// The admin account should be the only DB account, but we use a loop of all accounts to avoid bugs
|
// The admin account should be the only DB account, but we use a loop of all accounts to avoid bugs
|
||||||
|
/** @var \Modules\Admin\Models\Account[] $accounts */
|
||||||
$accounts = AccountMapper::getAll()->execute();
|
$accounts = AccountMapper::getAll()->execute();
|
||||||
|
|
||||||
foreach ($accounts as $account) {
|
foreach ($accounts as $account) {
|
||||||
|
|
@ -153,10 +154,10 @@ final class Installer extends InstallerAbstract
|
||||||
/**
|
/**
|
||||||
* Create collection.
|
* Create collection.
|
||||||
*
|
*
|
||||||
* @param ApplicationAbstract $app Application
|
* @param ApplicationAbstract $app Application
|
||||||
* @param array $data Media info
|
* @param array{path?:string, name?:string, virtualPath?:string, create_directory?:bool} $data Media info
|
||||||
*
|
*
|
||||||
* @return Collection
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -193,7 +194,7 @@ final class Installer extends InstallerAbstract
|
||||||
* @param ApplicationAbstract $app Application
|
* @param ApplicationAbstract $app Application
|
||||||
* @param array $data Media info
|
* @param array $data Media info
|
||||||
*
|
*
|
||||||
* @return MediaType
|
* @return array
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
|
|
@ -282,6 +283,7 @@ final class Installer extends InstallerAbstract
|
||||||
\RecursiveIteratorIterator::SELF_FIRST
|
\RecursiveIteratorIterator::SELF_FIRST
|
||||||
);
|
);
|
||||||
|
|
||||||
|
/** @var \DirectoryIterator $iterator */
|
||||||
foreach ($iterator as $item) {
|
foreach ($iterator as $item) {
|
||||||
if ($item->isDir()) {
|
if ($item->isDir()) {
|
||||||
continue;
|
continue;
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ Generally, the development philosophy is result orientated. This means that anyo
|
||||||
|
|
||||||
Developers are encouraged to pick open tasks with high priorities according to their own skill level. Senior developers may directly assign tasks to developers based on their importance. New developers may find it easier to start with a task that has a low priority as they often also have a lower difficulty.
|
Developers are encouraged to pick open tasks with high priorities according to their own skill level. Senior developers may directly assign tasks to developers based on their importance. New developers may find it easier to start with a task that has a low priority as they often also have a lower difficulty.
|
||||||
|
|
||||||
Open tasks can be found in the project overview: [PROJECT.md](../Project/PROJECT.md)
|
Open tasks can be found in the project overview: [PROJECT.md](https://github.com/Karaka-Management/Organization-Guide/blob/master/Project/PROJECT.md)
|
||||||
|
|
||||||
Tasks currently in development are prefixed in the priority column with an asterisk `*` and a name tag in the task description of the developer who is working on the task.
|
Tasks currently in development are prefixed in the priority column with an asterisk `*` and a name tag in the task description of the developer who is working on the task.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -77,7 +77,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function apiMediaUpload(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
public function apiMediaUpload(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
$uploads = $this->uploadFiles(
|
$uploads = $this->uploadFiles(
|
||||||
names: $request->getDataList('names'),
|
names: $request->getDataList('names'),
|
||||||
|
|
@ -385,10 +385,10 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function apiMediaUpdate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
public function apiMediaUpdate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
/** @var Media $old */
|
/** @var Media $old */
|
||||||
$old = clone MediaMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
$old = MediaMapper::get()->where('id', (int) $request->getData('id'))->execute();
|
||||||
|
|
||||||
/** @var Media $new */
|
/** @var Media $new */
|
||||||
$new = $this->updateMediaFromRequest($request);
|
$new = $this->updateMediaFromRequest($request);
|
||||||
|
|
@ -457,7 +457,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function apiCollectionCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
public function apiCollectionCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateCollectionCreate($request))) {
|
if (!empty($val = $this->validateCollectionCreate($request))) {
|
||||||
$response->set('collection_create', new FormValidation($val));
|
$response->set('collection_create', new FormValidation($val));
|
||||||
|
|
@ -648,7 +648,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function apiMediaCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
public function apiMediaCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
$path = \urldecode((string) ($request->getData('path') ?? ''));
|
$path = \urldecode((string) ($request->getData('path') ?? ''));
|
||||||
$virtualPath = \urldecode((string) ($request->getData('virtualpath') ?? '/'));
|
$virtualPath = \urldecode((string) ($request->getData('virtualpath') ?? '/'));
|
||||||
|
|
@ -723,7 +723,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function apiMediaExport(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
public function apiMediaExport(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (((int) $request->getData('id')) !== 0) {
|
if (((int) $request->getData('id')) !== 0) {
|
||||||
/** @var Media $media */
|
/** @var Media $media */
|
||||||
|
|
@ -916,7 +916,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function apiMediaTypeCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
public function apiMediaTypeCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateMediaTypeCreate($request))) {
|
if (!empty($val = $this->validateMediaTypeCreate($request))) {
|
||||||
$response->set('media_type_create', new FormValidation($val));
|
$response->set('media_type_create', new FormValidation($val));
|
||||||
|
|
@ -986,7 +986,7 @@ final class ApiController extends Controller
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function apiMediaTypeL11nCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : void
|
public function apiMediaTypeL11nCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : void
|
||||||
{
|
{
|
||||||
if (!empty($val = $this->validateMediaTypeL11nCreate($request))) {
|
if (!empty($val = $this->validateMediaTypeL11nCreate($request))) {
|
||||||
$response->set('media_type_l11n_create', new FormValidation($val));
|
$response->set('media_type_l11n_create', new FormValidation($val));
|
||||||
|
|
|
||||||
|
|
@ -71,7 +71,7 @@ final class BackendController extends Controller
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function viewMediaList(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
public function viewMediaList(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/Media/Theme/Backend/media-list');
|
$view->setTemplate('/Modules/Media/Theme/Backend/media-list');
|
||||||
|
|
@ -204,7 +204,7 @@ final class BackendController extends Controller
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function viewMediaSingle(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
public function viewMediaSingle(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
||||||
{
|
{
|
||||||
$view = new MediaView($this->app->l11nManager, $request, $response);
|
$view = new MediaView($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/Media/Theme/Backend/media-single');
|
$view->setTemplate('/Modules/Media/Theme/Backend/media-single');
|
||||||
|
|
@ -355,7 +355,7 @@ final class BackendController extends Controller
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function viewModuleSettings(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
public function viewModuleSettings(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000105001, $request, $response));
|
$view->addData('nav', $this->app->moduleManager->get('Navigation')->createNavigationMid(1000105001, $request, $response));
|
||||||
|
|
@ -391,7 +391,7 @@ final class BackendController extends Controller
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function viewMediaTypeSettings(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
public function viewMediaTypeSettings(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/' . static::NAME . '/Admin/Settings/Theme/Backend/settings-type');
|
$view->setTemplate('/Modules/' . static::NAME . '/Admin/Settings/Theme/Backend/settings-type');
|
||||||
|
|
@ -419,7 +419,7 @@ final class BackendController extends Controller
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function viewMediaUpload(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
public function viewMediaUpload(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/Media/Theme/Backend/media-upload');
|
$view->setTemplate('/Modules/Media/Theme/Backend/media-upload');
|
||||||
|
|
@ -439,7 +439,7 @@ final class BackendController extends Controller
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function viewMediaFileCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
public function viewMediaFileCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/Media/Theme/Backend/media-file-create');
|
$view->setTemplate('/Modules/Media/Theme/Backend/media-file-create');
|
||||||
|
|
@ -462,7 +462,7 @@ final class BackendController extends Controller
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
* @codeCoverageIgnore
|
* @codeCoverageIgnore
|
||||||
*/
|
*/
|
||||||
public function viewMediaCollectionCreate(RequestAbstract $request, ResponseAbstract $response, $data = null) : RenderableInterface
|
public function viewMediaCollectionCreate(RequestAbstract $request, ResponseAbstract $response, mixed $data = null) : RenderableInterface
|
||||||
{
|
{
|
||||||
$view = new View($this->app->l11nManager, $request, $response);
|
$view = new View($this->app->l11nManager, $request, $response);
|
||||||
$view->setTemplate('/Modules/Media/Theme/Backend/media-collection-create');
|
$view->setTemplate('/Modules/Media/Theme/Backend/media-collection-create');
|
||||||
|
|
|
||||||
|
|
@ -60,7 +60,7 @@ class MediaMapper extends DataMapperFactory
|
||||||
/**
|
/**
|
||||||
* Belongs to.
|
* Belongs to.
|
||||||
*
|
*
|
||||||
* @var array<string, array{mapper:string, external:string}>
|
* @var array<string, array{mapper:string, external:string, column?:string, by?:string}>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public const BELONGS_TO = [
|
public const BELONGS_TO = [
|
||||||
|
|
|
||||||
|
|
@ -84,11 +84,13 @@ class BaseView extends View
|
||||||
*/
|
*/
|
||||||
public function render(...$data) : string
|
public function render(...$data) : string
|
||||||
{
|
{
|
||||||
|
/** @var array{0:string, 1:string, 2:string, 3?:string, 4?:bool} $data */
|
||||||
$this->form = $data[0];
|
$this->form = $data[0];
|
||||||
$this->id = $data[1];
|
$this->id = $data[1];
|
||||||
$this->name = $data[2];
|
$this->name = $data[2];
|
||||||
$this->virtualPath = $data[3] ?? '/';
|
$this->virtualPath = $data[3] ?? '/';
|
||||||
$this->isRequired = $data[4] ?? false;
|
$this->isRequired = $data[4] ?? false;
|
||||||
|
|
||||||
return parent::render();
|
return parent::render();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -68,6 +68,7 @@ class BaseView extends View
|
||||||
*/
|
*/
|
||||||
public function render(...$data) : string
|
public function render(...$data) : string
|
||||||
{
|
{
|
||||||
|
/** @var array{0:string, 1?:string, 2?:string} $data */
|
||||||
$this->form = $data[0];
|
$this->form = $data[0];
|
||||||
$this->name = $data[1] ?? 'UNDEFINED';
|
$this->name = $data[1] ?? 'UNDEFINED';
|
||||||
$this->virtualPath = $data[2] ?? '';
|
$this->virtualPath = $data[2] ?? '';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user