diff --git a/Admin/Installer.php b/Admin/Installer.php index c80e909..b942e99 100755 --- a/Admin/Installer.php +++ b/Admin/Installer.php @@ -55,7 +55,7 @@ final class Installer extends InstallerAbstract WikiAppMapper::create()->execute($app); $category = new WikiCategory(); - $category->app = new NullWikiApp($app->getId()); + $category->app = new NullWikiApp($app->id); $category->setL11n('Default'); WikiCategoryMapper::create()->execute($category); diff --git a/Controller/ApiController.php b/Controller/ApiController.php index 0f40e73..8ce8303 100755 --- a/Controller/ApiController.php +++ b/Controller/ApiController.php @@ -124,21 +124,21 @@ final class ApiController extends Controller foreach ($uploaded as $media) { $this->createModelRelation( $request->header->account, - $doc->getId(), - $media->getId(), + $doc->id, + $media->id, WikiDocMapper::class, 'media', '', $request->getOrigin() ); - $accountPath = '/Accounts/' . $account->getId() . ' ' . $account->login - . '/Knowledgebase/' . ($doc->category?->getId() ?? '0') - . '/' . $doc->getId(); + $accountPath = '/Accounts/' . $account->id . ' ' . $account->login + . '/Knowledgebase/' . ($doc->category?->id ?? '0') + . '/' . $doc->id; $ref = new Reference(); $ref->name = $media->name; - $ref->source = new NullMedia($media->getId()); + $ref->source = new NullMedia($media->id); $ref->createdBy = new NullAccount($request->header->account); $ref->setVirtualPath($accountPath); @@ -148,14 +148,14 @@ final class ApiController extends Controller $collection = $this->app->moduleManager->get('Media')->createRecursiveMediaCollection( $accountPath, $request->header->account, - __DIR__ . '/../../../Modules/Media/Files/Accounts/' . $account->getId() . '/Knowledgebase/' . ($doc->category?->getId() ?? '0') . '/' . $doc->getId() + __DIR__ . '/../../../Modules/Media/Files/Accounts/' . $account->id . '/Knowledgebase/' . ($doc->category?->id ?? '0') . '/' . $doc->id ); } $this->createModelRelation( $request->header->account, - $collection->getId(), - $ref->getId(), + $collection->id, + $ref->id, CollectionMapper::class, 'sources', '', @@ -172,8 +172,8 @@ final class ApiController extends Controller $media = MediaMapper::get()->where('id', (int) $file)->limit(1)->execute(); $this->createModelRelation( $request->header->account, - $doc->getId(), - $media->getId(), + $doc->id, + $media->id, WikiDocMapper::class, 'media', '', @@ -182,7 +182,7 @@ final class ApiController extends Controller $ref = new Reference(); $ref->name = $media->name; - $ref->source = new NullMedia($media->getId()); + $ref->source = new NullMedia($media->id); $ref->createdBy = new NullAccount($request->header->account); $ref->setVirtualPath($path); @@ -198,8 +198,8 @@ final class ApiController extends Controller $this->createModelRelation( $request->header->account, - $collection->getId(), - $ref->getId(), + $collection->id, + $ref->id, CollectionMapper::class, 'sources', '', @@ -221,8 +221,8 @@ final class ApiController extends Controller private function createWikiDir(WikiDoc $doc) : string { return '/Modules/Knowledgebase/' - . ($doc->category?->getId() ?? '0') . '/' - . $doc->getId(); + . ($doc->category?->id ?? '0') . '/' + . $doc->id; } /** diff --git a/Controller/BackendController.php b/Controller/BackendController.php index cc073c1..179b274 100755 --- a/Controller/BackendController.php +++ b/Controller/BackendController.php @@ -319,7 +319,7 @@ final class BackendController extends Controller $accountId = $request->header->account; if (!$this->app->accountManager->get($accountId)->hasPermission( - PermissionType::READ, $this->app->unitId, $this->app->appId, self::NAME, PermissionCategory::WIKI, $document->getId()) + PermissionType::READ, $this->app->unitId, $this->app->appId, self::NAME, PermissionCategory::WIKI, $document->id) ) { $view->setTemplate('/Web/Backend/Error/403_inline'); $response->header->status = RequestStatusCode::R_403; @@ -340,7 +340,7 @@ final class BackendController extends Controller $view->setData('categories', $categories); $view->setData('document', $document); $view->addData('editable', $this->app->accountManager->get($accountId)->hasPermission( - PermissionType::MODIFY, $this->app->unitId, $this->app->appId, self::NAME, PermissionCategory::WIKI, $document->getId()) + PermissionType::MODIFY, $this->app->unitId, $this->app->appId, self::NAME, PermissionCategory::WIKI, $document->id) ); return $view; diff --git a/Models/WikiApp.php b/Models/WikiApp.php index 4bb025c..6ce4c5f 100755 --- a/Models/WikiApp.php +++ b/Models/WikiApp.php @@ -30,7 +30,7 @@ class WikiApp implements \JsonSerializable * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; /** * Unit diff --git a/Models/WikiCategory.php b/Models/WikiCategory.php index e4f1540..dd7f912 100755 --- a/Models/WikiCategory.php +++ b/Models/WikiCategory.php @@ -33,7 +33,7 @@ class WikiCategory implements \JsonSerializable * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; /** * App id. diff --git a/Models/WikiDoc.php b/Models/WikiDoc.php index 132b172..34ae94f 100755 --- a/Models/WikiDoc.php +++ b/Models/WikiDoc.php @@ -36,7 +36,7 @@ class WikiDoc implements \JsonSerializable * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; /** * Version. @@ -70,7 +70,7 @@ class WikiDoc implements \JsonSerializable * @var int * @since 1.0.0 */ - private int $status = WikiStatus::ACTIVE; + public int $status = WikiStatus::ACTIVE; /** * Document content. @@ -102,7 +102,7 @@ class WikiDoc implements \JsonSerializable * @var string * @since 1.0.0 */ - private string $language = ISO639x1Enum::_EN; + public string $language = ISO639x1Enum::_EN; /** * Tags. diff --git a/Models/WikiDocHistory.php b/Models/WikiDocHistory.php index dbc138e..a901a41 100755 --- a/Models/WikiDocHistory.php +++ b/Models/WikiDocHistory.php @@ -34,7 +34,7 @@ class WikiDocHistory implements \JsonSerializable * @var int * @since 1.0.0 */ - protected int $id = 0; + public int $id = 0; /** * Article ID. @@ -98,7 +98,7 @@ class WikiDocHistory implements \JsonSerializable * @var string * @since 1.0.0 */ - private string $language = ISO639x1Enum::_EN; + public string $language = ISO639x1Enum::_EN; /** * Constructor. @@ -123,7 +123,7 @@ class WikiDocHistory implements \JsonSerializable public static function createFromDoc(WikiDoc $doc) : self { $hist = new self(); - $hist->article = $doc->getId(); + $hist->article = $doc->id; $hist->createdBy = $doc->createdBy; $hist->name = $doc->name; $hist->doc = $doc->doc; diff --git a/Theme/Backend/wiki-category-list.tpl.php b/Theme/Backend/wiki-category-list.tpl.php index 41bf849..f4f7555 100755 --- a/Theme/Backend/wiki-category-list.tpl.php +++ b/Theme/Backend/wiki-category-list.tpl.php @@ -34,9 +34,9 @@ echo $this->getData('nav')->render();