make id public, organigram impl. media password/encryption, settings bug fix, Money->FloatInt change, ...

This commit is contained in:
Dennis Eichhorn 2023-05-06 11:42:05 +00:00
parent 08124abc60
commit 881e402d0c
16 changed files with 23 additions and 23 deletions

View File

@ -71,7 +71,7 @@ if (!empty($settingData)) {
$currentExportTableFields = !empty($exportTables) ? $exportSchemaMapper->getFields($exportTables[0]) : [];
}
$isNew = $currentSetting instanceof NullExchangeSetting;
$isNew = $currentSetting->id === 0;
?>
<div class="row">
<div class="col-xs-12">
@ -181,10 +181,10 @@ $isNew = $currentSetting instanceof NullExchangeSetting;
<tbody>
<?php
foreach ($settings as $setting) :
$url = UriFactory::build('{/base}/admin/exchange/import/profile?id=' . $interface->getId() . '&setting=' . $setting->getId());
$url = UriFactory::build('{/base}/admin/exchange/import/profile?id=' . $interface->id . '&setting=' . $setting->id);
?>
<tr data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><?= $setting->getId(); ?></a>
<td><a href="<?= $url; ?>"><?= $setting->id; ?></a>
<td class="wf-100"><a href="<?= $url; ?>"><?= $setting->title; ?></a>
<?php endforeach; ?>
</table>

View File

@ -205,7 +205,7 @@ final class ApiController extends Controller
);
foreach ($uploaded as $upload) {
if ($upload instanceof NullMedia) {
if ($upload->id === 0) {
continue;
}
@ -220,7 +220,7 @@ final class ApiController extends Controller
$request->header->account
);
if ($collection instanceof NullCollection) {
if ($collection->id === 0) {
$response->header->status = RequestStatusCode::R_403;
$this->fillJsonResponse($request, $response, NotificationLevel::ERROR, 'Interface', 'Couldn\'t create collection for interface', null);
@ -232,7 +232,7 @@ final class ApiController extends Controller
$this->createModel($request->header->account, $collection, CollectionMapper::class, 'collection', $request->getOrigin());
$interface = $this->createInterfaceFromRequest($request, $collection->getId());
$interface = $this->createInterfaceFromRequest($request, $collection->id);
$this->createModel($request->header->account, $interface, InterfaceManagerMapper::class, 'interface', $request->getOrigin());

View File

@ -32,7 +32,7 @@ class ExchangeLog implements \JsonSerializable
* @var int
* @since 1.0.0
*/
protected int $id = 0;
public int $id = 0;
/**
* Message.
@ -58,7 +58,7 @@ class ExchangeLog implements \JsonSerializable
* @var int
* @since 1.0.0
*/
private int $type = ExchangeType::IMPORT;
public int $type = ExchangeType::IMPORT;
/**
* Exchange specific subtype.

View File

@ -32,7 +32,7 @@ class ExchangeSetting implements \JsonSerializable
* @var int
* @since 1.0.0
*/
protected int $id = 0;
public int $id = 0;
/**
* Title.

View File

@ -38,7 +38,7 @@ class InterfaceManager
* @var int
* @since 1.0.0
*/
protected int $id = 0;
public int $id = 0;
/**
* File path.

View File

@ -39,7 +39,7 @@ echo $this->getData('nav')->render();
</label>
<tbody>
<?php $count = 0; foreach ($interfaces as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/base}/admin/exchange/export/profile?{?}&id=' . $value->getId()); ?>
$url = \phpOMS\Uri\UriFactory::build('{/base}/admin/exchange/export/profile?{?}&id=' . $value->id); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Title'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->title); ?></a>
<?php endforeach; ?>

View File

@ -39,7 +39,7 @@ echo $this->getData('nav')->render();
</label>
<tbody>
<?php $count = 0; foreach ($interfaces as $key => $value) : ++$count;
$url = \phpOMS\Uri\UriFactory::build('{/base}/admin/exchange/import/profile?{?}&id=' . $value->getId()); ?>
$url = \phpOMS\Uri\UriFactory::build('{/base}/admin/exchange/import/profile?{?}&id=' . $value->id); ?>
<tr tabindex="0" data-href="<?= $url; ?>">
<td data-label="<?= $this->getHtml('Title'); ?>"><a href="<?= $url; ?>"><?= $this->printHtml($value->title); ?></a>
<?php endforeach; ?>

View File

@ -102,10 +102,10 @@ echo $this->getData('nav')->render(); ?>
<tbody>
<?php $count = 0; foreach ($logs as $key => $value) :
++$count;
$url = UriFactory::build('{/base}/admin/exchange/log?{?}&id=' . $value->getId());
$url = UriFactory::build('{/base}/admin/exchange/log?{?}&id=' . $value->id);
?>
<tr data-href="<?= $url; ?>">
<td><a href="<?= $url; ?>"><?= $value->getId(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->id; ?></a>
<td><a href="<?= $url; ?>"><?= $value->getType(); ?></a>
<td><a href="<?= $url; ?>"><?= $value->subtype; ?></a>
<td><a href="<?= $url; ?>"><?= $value->exchange->title; ?></a>

View File

@ -26,11 +26,11 @@ echo $this->getData('nav')->render();
<div class="portlet-body">
<table class="list w-100">
<tbody>
<tr><td><?= $this->getHtml('ID', '0', '0'); ?><td class="wf-100"><?= $log->getId(); ?>
<tr><td><?= $this->getHtml('ID', '0', '0'); ?><td class="wf-100"><?= $log->id; ?>
<tr><td><?= $this->getHtml('Type'); ?><td class="wf-100"><?= $log->getType(); ?>
<tr><td><?= $this->getHtml('Subtype'); ?><td class="wf-100"><?= $log->subtype; ?>
<tr><td><?= $this->getHtml('Created'); ?><td><?= $log->createdAt->format('Y-m-d'); ?>
<tr><td><?= $this->getHtml('Creator'); ?><td><a href="<?= UriFactory::build('{/base}/profile/single?for=' . $log->createdBy->getId()); ?>"><?= $log->createdBy->name1; ?></a>
<tr><td><?= $this->getHtml('Creator'); ?><td><a href="<?= UriFactory::build('{/base}/profile/single?for=' . $log->createdBy->id); ?>"><?= $log->createdBy->name1; ?></a>
<tr><td colspan="2"><?= $log->message; ?>
</table>
</div>

View File

@ -168,7 +168,7 @@ final class ApiControllerTest extends \PHPUnit\Framework\TestCase
TestUtils::setMember($request, 'files', $files);
$this->module->apiInterfaceInstall($request, $response);
self::assertGreaterThan(0, $response->get('')['response']->getId());
self::assertGreaterThan(0, $response->get('')['response']->id);
}
if (\is_dir(__DIR__ . '/temp')) {

View File

@ -36,7 +36,7 @@ final class Exporter extends ExporterAbstract
* @var int
* @since 1.0.0
*/
private int $account = 1;
public int $account = 1;
/**
* Export all data in time span

View File

@ -39,7 +39,7 @@ final class Importer extends ImporterAbstract
* @var int
* @since 1.0.0
*/
private int $account = 1;
public int $account = 1;
/**
* Import all data in time span

View File

@ -38,7 +38,7 @@ final class ExchangeLogTest extends \PHPUnit\Framework\TestCase
*/
public function testDefault() : void
{
self::assertEquals(0, $this->log->getId());
self::assertEquals(0, $this->log->id);
self::assertEquals('', $this->log->message);
self::assertEquals('', $this->log->subtype);
self::assertEquals(0, $this->log->exchange);

View File

@ -37,7 +37,7 @@ final class InterfaceManagerTest extends \PHPUnit\Framework\TestCase
*/
public function testDefault() : void
{
self::assertEquals(0, $this->interface->getId());
self::assertEquals(0, $this->interface->id);
self::assertEquals('', $this->interface->getPath());
self::assertEquals('', $this->interface->title);
self::assertFalse($this->interface->hasImport);

View File

@ -37,6 +37,6 @@ final class NullExchangeLogTest extends \PHPUnit\Framework\TestCase
public function testId() : void
{
$null = new NullExchangeLog(2);
self::assertEquals(2, $null->getId());
self::assertEquals(2, $null->id);
}
}

View File

@ -37,6 +37,6 @@ final class NullInterfaceManagerTest extends \PHPUnit\Framework\TestCase
public function testId() : void
{
$null = new NullInterfaceManager(2);
self::assertEquals(2, $null->getId());
self::assertEquals(2, $null->id);
}
}