mirror of
https://github.com/Karaka-Management/oms-Knowledgebase.git
synced 2026-02-08 22:38:41 +00:00
impl. lazy loading and better media lists
This commit is contained in:
parent
83cdc6b18e
commit
82fc2e75fe
|
|
@ -63,8 +63,8 @@
|
||||||
"pid": "/wiki",
|
"pid": "/wiki",
|
||||||
"type": 3,
|
"type": 3,
|
||||||
"subtype": 1,
|
"subtype": 1,
|
||||||
"name": "Apps",
|
"name": "Wiki",
|
||||||
"uri": "{/prefix}wiki/app/list",
|
"uri": "{/prefix}wiki/list",
|
||||||
"target": "self",
|
"target": "self",
|
||||||
"icon": null,
|
"icon": null,
|
||||||
"order": 15,
|
"order": 15,
|
||||||
|
|
|
||||||
|
|
@ -14,12 +14,15 @@ declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Knowledgebase\Admin;
|
namespace Modules\Knowledgebase\Admin;
|
||||||
|
|
||||||
|
use Modules\Knowledgebase\Models\WikiApp;
|
||||||
use Modules\Knowledgebase\Models\WikiCategory;
|
use Modules\Knowledgebase\Models\WikiCategory;
|
||||||
use Modules\Knowledgebase\Models\WikiCategoryMapper;
|
use Modules\Knowledgebase\Models\WikiCategoryMapper;
|
||||||
use phpOMS\Config\SettingsInterface;
|
use phpOMS\Config\SettingsInterface;
|
||||||
use phpOMS\DataStorage\Database\DatabasePool;
|
use phpOMS\DataStorage\Database\DatabasePool;
|
||||||
use phpOMS\Module\InstallerAbstract;
|
use phpOMS\Module\InstallerAbstract;
|
||||||
use phpOMS\Module\ModuleInfo;
|
use phpOMS\Module\ModuleInfo;
|
||||||
|
use Modules\Knowledgebase\Models\WikiAppMapper;
|
||||||
|
use Modules\Knowledgebase\Models\NullWikiApp;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Installer class.
|
* Installer class.
|
||||||
|
|
@ -38,7 +41,13 @@ final class Installer extends InstallerAbstract
|
||||||
{
|
{
|
||||||
parent::install($dbPool, $info, $cfgHandler);
|
parent::install($dbPool, $info, $cfgHandler);
|
||||||
|
|
||||||
|
$app = new WikiApp();
|
||||||
|
$app->setName('Default');
|
||||||
|
|
||||||
|
$id = WikiAppMapper::create($app);
|
||||||
|
|
||||||
$category = new WikiCategory();
|
$category = new WikiCategory();
|
||||||
|
$category->setApp(new NullWikiApp($id));
|
||||||
$category->setName('Default');
|
$category->setName('Default');
|
||||||
$category->setPath('/');
|
$category->setPath('/');
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,10 +37,10 @@ class WikiCategory implements \JsonSerializable
|
||||||
*
|
*
|
||||||
* There can be different wikis
|
* There can be different wikis
|
||||||
*
|
*
|
||||||
* @var null|WikiApp
|
* @var WikiApp
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private ?WikiApp $app = null;
|
private WikiApp $app;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Name.
|
* Name.
|
||||||
|
|
@ -66,6 +66,16 @@ class WikiCategory implements \JsonSerializable
|
||||||
*/
|
*/
|
||||||
private ?self $parent = null;
|
private ?self $parent = null;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Cosntructor
|
||||||
|
*
|
||||||
|
* @since 1.0.0
|
||||||
|
*/
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
$this->app = new NullWikiApp();
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id.
|
* Get id.
|
||||||
*
|
*
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user