mirror of
https://github.com/Karaka-Management/oms-Editor.git
synced 2026-01-25 07:48:42 +00:00
update
This commit is contained in:
parent
0039e2f677
commit
ff3b15caff
|
|
@ -144,7 +144,7 @@ final class Installer extends InstallerAbstract
|
|||
|
||||
$module->apiEditorDocTypeCreate($request, $response);
|
||||
|
||||
$responseData = $response->get('');
|
||||
$responseData = $response->getData('');
|
||||
if (!\is_array($responseData)) {
|
||||
return [];
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,10 @@
|
|||
import { jsOMS } from '../../jsOMS/Utils/oLib.js';
|
||||
import { Autoloader } from '../../jsOMS/Autoloader.js';
|
||||
import { Editor } from './Models/Editor.js';
|
||||
|
||||
Autoloader.defineNamespace('jsOMS.Modules');
|
||||
Autoloader.defineNamespace('omsApp.Modules');
|
||||
|
||||
jsOMS.Modules.Editor = class {
|
||||
omsApp.Modules.Editor = class {
|
||||
constructor(app)
|
||||
{
|
||||
this.app = app;
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ final class ApiController extends Controller
|
|||
$internalResponse = new HttpResponse();
|
||||
$this->app->moduleManager->get('Tag')->apiTagCreate($request, $internalResponse);
|
||||
|
||||
if (!\is_array($data = $internalResponse->get($request->uri->__toString()))) {
|
||||
if (!\is_array($data = $internalResponse->getDataArray($request->uri->__toString()))) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'يبدأ',
|
||||
'Text' => 'نص',
|
||||
'Title' => 'عنوان',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Start',
|
||||
'Text' => 'Text',
|
||||
'Title' => 'Titul',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Start',
|
||||
'Text' => 'Tekst',
|
||||
'Title' => 'Titel',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Anfang',
|
||||
'Text' => 'Text',
|
||||
'Title' => 'Titel',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Αρχή',
|
||||
'Text' => 'Κείμενο',
|
||||
'Title' => 'Τίτλος',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Comienzo',
|
||||
'Text' => 'Texto',
|
||||
'Title' => 'Título',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'alkaa',
|
||||
'Text' => 'Teksti',
|
||||
'Title' => 'Otsikko',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Démarrer',
|
||||
'Text' => 'Texte',
|
||||
'Title' => 'Titre',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Rajt',
|
||||
'Text' => 'Szöveg',
|
||||
'Title' => 'Cím',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Inizio',
|
||||
'Text' => 'Testo',
|
||||
'Title' => 'Titolo',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => '始める',
|
||||
'Text' => '文章',
|
||||
'Title' => 'タイトル',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => '시작',
|
||||
'Text' => '텍스트',
|
||||
'Title' => '제목',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Start',
|
||||
'Text' => 'Tekst',
|
||||
'Title' => 'Tittel',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Początek',
|
||||
'Text' => 'Tekst',
|
||||
'Title' => 'Tytuł',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Começar',
|
||||
'Text' => 'Texto',
|
||||
'Title' => 'Título',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Начинать',
|
||||
'Text' => 'Текст',
|
||||
'Title' => 'Заголовок',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Start',
|
||||
'Text' => 'Text',
|
||||
'Title' => 'Titel',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'เริ่ม',
|
||||
'Text' => 'ข้อความ',
|
||||
'Title' => 'ชื่อ',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Başlangıç',
|
||||
'Text' => 'Metin',
|
||||
'Title' => 'Başlık',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => 'Почати',
|
||||
'Text' => 'Текст',
|
||||
'Title' => 'Заголовок',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -30,5 +30,5 @@ return ['Editor' => [
|
|||
'Start' => '开始',
|
||||
'Text' => '文本',
|
||||
'Title' => '标题',
|
||||
'Type' => '#VALUE!',
|
||||
'Type' => '',
|
||||
]];
|
||||
|
|
|
|||
|
|
@ -125,8 +125,8 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
$this->module->apiEditorCreate($request, $response);
|
||||
|
||||
self::assertEquals('Controller Test Title', $response->get('')['response']->title);
|
||||
self::assertGreaterThan(0, $response->get('')['response']->id);
|
||||
self::assertEquals('Controller Test Title', $response->getDataArray('')['response']->title);
|
||||
self::assertGreaterThan(0, $response->getDataArray('')['response']->id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -159,7 +159,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
|||
$request->setData('media', \json_encode([1]));
|
||||
|
||||
$this->module->apiFileCreate($request, $response);
|
||||
self::assertCount(1, $response->get('')['response']);
|
||||
self::assertCount(1, $response->getDataArray('')['response']);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -226,9 +226,9 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
$this->module->apiEditorUpdate($request, $response);
|
||||
|
||||
self::assertEquals('Changed Title', $response->get('')['response']->title);
|
||||
self::assertEquals('Changed Title', $response->getDataArray('')['response']->title);
|
||||
self::assertEquals('Changed Title', EditorDocMapper::get()->where('id', 1)->execute()->title);
|
||||
self::assertEquals(1, $response->get('')['response']->id);
|
||||
self::assertEquals(1, $response->getDataArray('')['response']->id);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -244,7 +244,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
|||
$request->setData('id', '1');
|
||||
|
||||
$this->module->apiEditorGet($request, $response);
|
||||
self::assertEquals('Changed Title', $response->get('')['response']->title);
|
||||
self::assertEquals('Changed Title', $response->getDataArray('')['response']->title);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -268,7 +268,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
|
|||
|
||||
$this->module->apiEditorDelete($request, $response);
|
||||
|
||||
self::assertEquals($docId, $response->get('')['response']->id);
|
||||
self::assertEquals($docId, $response->getDataArray('')['response']->id);
|
||||
self::assertInstanceOf(NullEditorDoc::class, EditorDocMapper::get()->where('id', $docId)->execute());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user