mirror of
https://github.com/Karaka-Management/oms-Exchange.git
synced 2026-02-17 02:08:40 +00:00
php cs fixer
This commit is contained in:
parent
bb3fbb1146
commit
cbb118f0c1
|
|
@ -1,31 +1,31 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
use Modules\Exchange\Controller\ApiController;
|
use Modules\Exchange\Controller\ApiController;
|
||||||
use Modules\Exchange\Models\PermissionState;
|
use Modules\Exchange\Models\PermissionState;
|
||||||
use phpOMS\Account\PermissionType;
|
use phpOMS\Account\PermissionType;
|
||||||
use phpOMS\Router\RouteVerb;
|
use phpOMS\Router\RouteVerb;
|
||||||
|
|
||||||
return [
|
return [
|
||||||
'^.*/admin/exchange/import/profile.*$' => [
|
'^.*/admin/exchange/import/profile.*$' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\Exchange\Controller\ApiController:apiExchangeImport',
|
'dest' => '\Modules\Exchange\Controller\ApiController:apiExchangeImport',
|
||||||
'verb' => RouteVerb::SET,
|
'verb' => RouteVerb::SET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::MODULE_NAME,
|
'module' => ApiController::MODULE_NAME,
|
||||||
'type' => PermissionType::CREATE,
|
'type' => PermissionType::CREATE,
|
||||||
'state' => PermissionState::IMPORT,
|
'state' => PermissionState::IMPORT,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
'^.*/admin/exchange/export/profile.*$' => [
|
'^.*/admin/exchange/export/profile.*$' => [
|
||||||
[
|
[
|
||||||
'dest' => '\Modules\Exchange\Controller\ApiController:apiExchangeExport',
|
'dest' => '\Modules\Exchange\Controller\ApiController:apiExchangeExport',
|
||||||
'verb' => RouteVerb::SET,
|
'verb' => RouteVerb::SET,
|
||||||
'permission' => [
|
'permission' => [
|
||||||
'module' => ApiController::MODULE_NAME,
|
'module' => ApiController::MODULE_NAME,
|
||||||
'type' => PermissionType::CREATE,
|
'type' => PermissionType::CREATE,
|
||||||
'state' => PermissionState::EXPORT,
|
'state' => PermissionState::EXPORT,
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
],
|
],
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
|
|
||||||
use Modules\Exchange\Controller\BackendController;
|
use Modules\Exchange\Controller\BackendController;
|
||||||
use Modules\Exchange\Models\PermissionState;
|
use Modules\Exchange\Models\PermissionState;
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ final class ApiController extends Controller
|
||||||
$response->set($request->getUri()->__toString(), [
|
$response->set($request->getUri()->__toString(), [
|
||||||
'status' => $status,
|
'status' => $status,
|
||||||
'title' => 'Exchange',
|
'title' => 'Exchange',
|
||||||
'message' => $message
|
'message' => $message,
|
||||||
]);
|
]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,67 +1,67 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
* PHP Version 7.2
|
* PHP Version 7.2
|
||||||
*
|
*
|
||||||
* @package Modules\Exchange\Interfaces\GSD\Model
|
* @package Modules\Exchange\Interfaces\GSD\Model
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://website.orange-management.de
|
* @link http://website.orange-management.de
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Exchange\Interfaces\GSD\Model;
|
namespace Modules\Exchange\Interfaces\GSD\Model;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mapper class.
|
* Mapper class.
|
||||||
*
|
*
|
||||||
* @package Modules\Exchange\Interfaces\GSD\Model
|
* @package Modules\Exchange\Interfaces\GSD\Model
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link http://website.orange-management.de
|
* @link http://website.orange-management.de
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
final class GSDCostCenterMapper extends DataMapperAbstract
|
final class GSDCostCenterMapper extends DataMapperAbstract
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, bool|string>>
|
* @var array<string, array<string, bool|string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $columns = [
|
protected static $columns = [
|
||||||
'ROW_ID' => ['name' => 'ROW_ID', 'type' => 'int', 'internal' => 'id'],
|
'ROW_ID' => ['name' => 'ROW_ID', 'type' => 'int', 'internal' => 'id'],
|
||||||
'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTime', 'internal' => 'createdAt'],
|
'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTime', 'internal' => 'createdAt'],
|
||||||
'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'],
|
'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'],
|
||||||
'KST' => ['name' => 'KST', 'type' => 'string', 'internal' => 'costcenter'],
|
'KST' => ['name' => 'KST', 'type' => 'string', 'internal' => 'costcenter'],
|
||||||
'Bezeichnung' => ['name' => 'Bezeichnung', 'type' => 'string', 'internal' => 'description'],
|
'Bezeichnung' => ['name' => 'Bezeichnung', 'type' => 'string', 'internal' => 'description'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary table.
|
* Primary table.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $table = 'FiKostenstellen';
|
protected static $table = 'FiKostenstellen';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created at.
|
* Created at.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $createdAt = 'row_create_time';
|
protected static $createdAt = 'row_create_time';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $primaryField = 'ROW_ID';
|
protected static $primaryField = 'ROW_ID';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,67 +1,67 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
* PHP Version 7.2
|
* PHP Version 7.2
|
||||||
*
|
*
|
||||||
* @package Modules\Exchange\Interfaces\GSD\Model
|
* @package Modules\Exchange\Interfaces\GSD\Model
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://website.orange-management.de
|
* @link http://website.orange-management.de
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Exchange\Interfaces\GSD\Model;
|
namespace Modules\Exchange\Interfaces\GSD\Model;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mapper class.
|
* Mapper class.
|
||||||
*
|
*
|
||||||
* @package Modules\Exchange\Interfaces\GSD\Model
|
* @package Modules\Exchange\Interfaces\GSD\Model
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link http://website.orange-management.de
|
* @link http://website.orange-management.de
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
final class GSDCostObjectMapper extends DataMapperAbstract
|
final class GSDCostObjectMapper extends DataMapperAbstract
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, bool|string>>
|
* @var array<string, array<string, bool|string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $columns = [
|
protected static $columns = [
|
||||||
'ROW_ID' => ['name' => 'ROW_ID', 'type' => 'int', 'internal' => 'id'],
|
'ROW_ID' => ['name' => 'ROW_ID', 'type' => 'int', 'internal' => 'id'],
|
||||||
'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTime', 'internal' => 'createdAt'],
|
'row_create_time' => ['name' => 'row_create_time', 'type' => 'DateTime', 'internal' => 'createdAt'],
|
||||||
'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'],
|
'row_create_user' => ['name' => 'row_create_user', 'type' => 'int', 'internal' => 'createdBy'],
|
||||||
'KTR' => ['name' => 'KTR', 'type' => 'string', 'internal' => 'costobject'],
|
'KTR' => ['name' => 'KTR', 'type' => 'string', 'internal' => 'costobject'],
|
||||||
'Bezeichnung' => ['name' => 'Bezeichnung', 'type' => 'string', 'internal' => 'description'],
|
'Bezeichnung' => ['name' => 'Bezeichnung', 'type' => 'string', 'internal' => 'description'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary table.
|
* Primary table.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $table = 'FiKostentraeger';
|
protected static $table = 'FiKostentraeger';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created at.
|
* Created at.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $createdAt = 'row_create_time';
|
protected static $createdAt = 'row_create_time';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $primaryField = 'ROW_ID';
|
protected static $primaryField = 'ROW_ID';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,22 +1,22 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
* PHP Version 7.2
|
* PHP Version 7.2
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://website.orange-management.de
|
* @link http://website.orange-management.de
|
||||||
*/
|
*/
|
||||||
return [
|
return [
|
||||||
'Accounts' => 'Accounts',
|
'Accounts' => 'Accounts',
|
||||||
'Articles' => 'Articles',
|
'Articles' => 'Articles',
|
||||||
'CostCenters' => 'Cost Centers',
|
'CostCenters' => 'Cost Centers',
|
||||||
'CostObjects' => 'Cost Objects',
|
'CostObjects' => 'Cost Objects',
|
||||||
'Customers' => 'Customers',
|
'Customers' => 'Customers',
|
||||||
'Invoices' => 'Invoices',
|
'Invoices' => 'Invoices',
|
||||||
'Options' => 'Options',
|
'Options' => 'Options',
|
||||||
'Suppliers' => 'Suppliers',
|
'Suppliers' => 'Suppliers',
|
||||||
];
|
];
|
||||||
|
|
|
||||||
|
|
@ -1,206 +1,206 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
* PHP Version 7.2
|
* PHP Version 7.2
|
||||||
*
|
*
|
||||||
* @package phpOMS\Module
|
* @package phpOMS\Module
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://website.orange-management.de
|
* @link http://website.orange-management.de
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Exchange\Models;
|
namespace Modules\Exchange\Models;
|
||||||
|
|
||||||
use phpOMS\System\File\PathException;
|
use phpOMS\System\File\PathException;
|
||||||
use phpOMS\Utils\ArrayUtils;
|
use phpOMS\Utils\ArrayUtils;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* InfoManager class.
|
* InfoManager class.
|
||||||
*
|
*
|
||||||
* Handling the info files for modules
|
* Handling the info files for modules
|
||||||
*
|
*
|
||||||
* @package phpOMS\Module
|
* @package phpOMS\Module
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link http://website.orange-management.de
|
* @link http://website.orange-management.de
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
class InterfaceManager
|
class InterfaceManager
|
||||||
{
|
{
|
||||||
/**
|
/**
|
||||||
* Interface ID.
|
* Interface ID.
|
||||||
*
|
*
|
||||||
* @var int
|
* @var int
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $id = 0;
|
private $id = 0;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* File path.
|
* File path.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $path = '';
|
private $path = '';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Info data.
|
* Info data.
|
||||||
*
|
*
|
||||||
* @var array<string, mixed>
|
* @var array<string, mixed>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
private $info = [];
|
private $info = [];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Object constructor.
|
* Object constructor.
|
||||||
*
|
*
|
||||||
* @param string $path Info file path
|
* @param string $path Info file path
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function __construct(string $path = '')
|
public function __construct(string $path = '')
|
||||||
{
|
{
|
||||||
$this->path = $path;
|
$this->path = $path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get id
|
* Get id
|
||||||
*
|
*
|
||||||
* @return int
|
* @return int
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getId() : int
|
public function getId() : int
|
||||||
{
|
{
|
||||||
return $this->id;
|
return $this->id;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get info path
|
* Get info path
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getPath() : string
|
public function getPath() : string
|
||||||
{
|
{
|
||||||
return $this->path;
|
return $this->path;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get info path
|
* Get info path
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getInterfacePath() : string
|
public function getInterfacePath() : string
|
||||||
{
|
{
|
||||||
return $this->info['path'];
|
return $this->info['path'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get info name
|
* Get info name
|
||||||
*
|
*
|
||||||
* @return string
|
* @return string
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function getName() : string
|
public function getName() : string
|
||||||
{
|
{
|
||||||
return $this->info['name'];
|
return $this->info['name'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides import interface
|
* Provides import interface
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function hasImport() : bool
|
public function hasImport() : bool
|
||||||
{
|
{
|
||||||
return $this->info['import'];
|
return $this->info['import'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Provides export interface
|
* Provides export interface
|
||||||
*
|
*
|
||||||
* @return bool
|
* @return bool
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function hasExport() : bool
|
public function hasExport() : bool
|
||||||
{
|
{
|
||||||
return $this->info['export'];
|
return $this->info['export'];
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Load info data from path.
|
* Load info data from path.
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @throws PathException This exception is thrown in case the info file path doesn't exist.
|
* @throws PathException this exception is thrown in case the info file path doesn't exist
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function load() : void
|
public function load() : void
|
||||||
{
|
{
|
||||||
if (!\file_exists($this->path)) {
|
if (!\file_exists($this->path)) {
|
||||||
throw new PathException($this->path);
|
throw new PathException($this->path);
|
||||||
}
|
}
|
||||||
|
|
||||||
$content = \file_get_contents($this->path);
|
$content = \file_get_contents($this->path);
|
||||||
$this->info = \json_decode($content !== false ? $content : '[]', true);
|
$this->info = \json_decode($content !== false ? $content : '[]', true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Update info file
|
* Update info file
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function update() : void
|
public function update() : void
|
||||||
{
|
{
|
||||||
if (!\file_exists($this->path)) {
|
if (!\file_exists($this->path)) {
|
||||||
throw new PathException($this->path);
|
throw new PathException($this->path);
|
||||||
}
|
}
|
||||||
|
|
||||||
\file_put_contents($this->path, \json_encode($this->info, JSON_PRETTY_PRINT));
|
\file_put_contents($this->path, \json_encode($this->info, \JSON_PRETTY_PRINT));
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set data
|
* Set data
|
||||||
*
|
*
|
||||||
* @param string $path Value path
|
* @param string $path Value path
|
||||||
* @param mixed $data Scalar or array of data to set
|
* @param mixed $data Scalar or array of data to set
|
||||||
* @param string $delim Delimiter of path
|
* @param string $delim Delimiter of path
|
||||||
*
|
*
|
||||||
* @return void
|
* @return void
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function set(string $path, $data, string $delim = '/') : void
|
public function set(string $path, $data, string $delim = '/') : void
|
||||||
{
|
{
|
||||||
if (!\is_scalar($data) && !\is_array($data) && !($data instanceof \JsonSerializable)) {
|
if (!\is_scalar($data) && !\is_array($data) && !($data instanceof \JsonSerializable)) {
|
||||||
throw new \InvalidArgumentException('Type of $data "' . \gettype($data) . '" is not supported.');
|
throw new \InvalidArgumentException('Type of $data "' . \gettype($data) . '" is not supported.');
|
||||||
}
|
}
|
||||||
|
|
||||||
ArrayUtils::setArray($path, $this->info, $data, $delim, true);
|
ArrayUtils::setArray($path, $this->info, $data, $delim, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Get info data.
|
* Get info data.
|
||||||
*
|
*
|
||||||
* @return array<string, mixed>
|
* @return array<string, mixed>
|
||||||
*
|
*
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
public function get() : array
|
public function get() : array
|
||||||
{
|
{
|
||||||
return $this->info;
|
return $this->info;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,61 +1,61 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
* PHP Version 7.2
|
* PHP Version 7.2
|
||||||
*
|
*
|
||||||
* @package Modules\Exchange
|
* @package Modules\Exchange
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://website.orange-management.de
|
* @link http://website.orange-management.de
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Exchange\Models;
|
namespace Modules\Exchange\Models;
|
||||||
|
|
||||||
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
use phpOMS\DataStorage\Database\DataMapperAbstract;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Mapper class.
|
* Mapper class.
|
||||||
*
|
*
|
||||||
* @package Modules\Exchange
|
* @package Modules\Exchange
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link http://website.orange-management.de
|
* @link http://website.orange-management.de
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
final class InterfaceManagerMapper extends DataMapperAbstract
|
final class InterfaceManagerMapper extends DataMapperAbstract
|
||||||
{
|
{
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Columns.
|
* Columns.
|
||||||
*
|
*
|
||||||
* @var array<string, array<string, bool|string>>
|
* @var array<string, array<string, bool|string>>
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $columns = [
|
protected static $columns = [
|
||||||
'exchange_id' => ['name' => 'exchange_id', 'type' => 'int', 'internal' => 'id'],
|
'exchange_id' => ['name' => 'exchange_id', 'type' => 'int', 'internal' => 'id'],
|
||||||
'exchange_title' => ['name' => 'exchange_title', 'type' => 'string', 'internal' => 'info/name'],
|
'exchange_title' => ['name' => 'exchange_title', 'type' => 'string', 'internal' => 'info/name'],
|
||||||
'exchange_path' => ['name' => 'exchange_path', 'type' => 'string', 'internal' => 'info/path'],
|
'exchange_path' => ['name' => 'exchange_path', 'type' => 'string', 'internal' => 'info/path'],
|
||||||
'exchange_version' => ['name' => 'exchange_version', 'type' => 'string', 'internal' => 'info/version'],
|
'exchange_version' => ['name' => 'exchange_version', 'type' => 'string', 'internal' => 'info/version'],
|
||||||
'exchange_export' => ['name' => 'exchange_export', 'type' => 'bool', 'internal' => 'info/export'],
|
'exchange_export' => ['name' => 'exchange_export', 'type' => 'bool', 'internal' => 'info/export'],
|
||||||
'exchange_import' => ['name' => 'exchange_import', 'type' => 'bool', 'internal' => 'info/import'],
|
'exchange_import' => ['name' => 'exchange_import', 'type' => 'bool', 'internal' => 'info/import'],
|
||||||
'exchange_website' => ['name' => 'exchange_website', 'type' => 'string', 'internal' => 'info/website'],
|
'exchange_website' => ['name' => 'exchange_website', 'type' => 'string', 'internal' => 'info/website'],
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary table.
|
* Primary table.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $table = 'exchange';
|
protected static $table = 'exchange';
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Primary field name.
|
* Primary field name.
|
||||||
*
|
*
|
||||||
* @var string
|
* @var string
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
protected static $primaryField = 'exchange_id';
|
protected static $primaryField = 'exchange_id';
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,32 +1,32 @@
|
||||||
<?php
|
<?php
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
* PHP Version 7.2
|
* PHP Version 7.2
|
||||||
*
|
*
|
||||||
* @package Modules\Exchange
|
* @package Modules\Exchange
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://website.orange-management.de
|
* @link http://website.orange-management.de
|
||||||
*/
|
*/
|
||||||
declare(strict_types=1);
|
declare(strict_types=1);
|
||||||
|
|
||||||
namespace Modules\Exchange\Models;
|
namespace Modules\Exchange\Models;
|
||||||
|
|
||||||
use phpOMS\Stdlib\Base\Enum;
|
use phpOMS\Stdlib\Base\Enum;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Permision state enum.
|
* Permision state enum.
|
||||||
*
|
*
|
||||||
* @package Modules\Exchange
|
* @package Modules\Exchange
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @link http://website.orange-management.de
|
* @link http://website.orange-management.de
|
||||||
* @since 1.0.0
|
* @since 1.0.0
|
||||||
*/
|
*/
|
||||||
abstract class PermissionState extends Enum
|
abstract class PermissionState extends Enum
|
||||||
{
|
{
|
||||||
public const IMPORT = 1;
|
public const IMPORT = 1;
|
||||||
public const EXPORT = 2;
|
public const EXPORT = 2;
|
||||||
public const DASHBOARD = 3;
|
public const DASHBOARD = 3;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
|
|
@ -14,4 +14,4 @@
|
||||||
/**
|
/**
|
||||||
* @var \phpOMS\Views\View $this
|
* @var \phpOMS\Views\View $this
|
||||||
*/
|
*/
|
||||||
echo $this->getData('nav')->render(); ?>
|
echo $this->getData('nav')->render();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,17 +1,17 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
* PHP Version 7.2
|
* PHP Version 7.2
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://website.orange-management.de
|
* @link http://website.orange-management.de
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \phpOMS\Views\View $this
|
* @var \phpOMS\Views\View $this
|
||||||
*/
|
*/
|
||||||
echo $this->getData('nav')->render(); ?>
|
echo $this->getData('nav')->render();
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
|
|
|
||||||
|
|
@ -1,21 +1,21 @@
|
||||||
<?php
|
<?php declare(strict_types=1);
|
||||||
/**
|
/**
|
||||||
* Orange Management
|
* Orange Management
|
||||||
*
|
*
|
||||||
* PHP Version 7.2
|
* PHP Version 7.2
|
||||||
*
|
*
|
||||||
* @package TBD
|
* @package TBD
|
||||||
* @copyright Dennis Eichhorn
|
* @copyright Dennis Eichhorn
|
||||||
* @license OMS License 1.0
|
* @license OMS License 1.0
|
||||||
* @version 1.0.0
|
* @version 1.0.0
|
||||||
* @link http://website.orange-management.de
|
* @link http://website.orange-management.de
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$lang = $this->getData('lang');
|
$lang = $this->getData('lang');
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var \phpOMS\Views\View $this
|
* @var \phpOMS\Views\View $this
|
||||||
*/
|
*/
|
||||||
echo $this->getData('nav')->render();
|
echo $this->getData('nav')->render();
|
||||||
|
|
||||||
include __DIR__ . '/../../Interfaces/' . $this->getData('interface')->getInterfacePath() . '/import.tpl.php';
|
include __DIR__ . '/../../Interfaces/' . $this->getData('interface')->getInterfacePath() . '/import.tpl.php';
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user