Skip to content
GitLab
Erkunden
Anmelden
Registrieren
Primärnavigation
Suchen oder aufrufen …
Projekt
Orders - Bestellungen
Verwalten
Aktivität
Mitglieder
Labels
Planen
Tickets
Ticketübersichten
Meilensteine
Wiki
Code
Merge Requests
Repository
Branch
Commits
Tags
Repository-Diagramm
Revisionen vergleichen
Code-Schnipsel
Build
Pipelines
Aufgaben
Pipeline-Zeitpläne
Artefakte
Bereitstellung
Releases
Modell-Registry
Betreiben
Umgebungen
Überwachen
Vorfälle
Service-Desk
Analysieren
Wertschöpfungskettenanalyse
Mitwirkenden-Analyse
CI/CD-Analyse
Repository-Analysen
Modellexperimente
Hilfe
Hilfe
Support
GitLab-Dokumentation
GitLab-Pläne vergleichen
Community-Forum
Zu GitLab beitragen
Feedback geben
Tastenkürzel
?
Code-Schnipsel
Gruppen
Projekte
Show more breadcrumbs
QUIQQER
Orders - Bestellungen
Commits
22920f9e
Commit
22920f9e
erstellt
7 years ago
von
Henning Leutz
Dateien durchsuchen
Optionen
Downloads
Patches
Einfaches Diff
refactor: code style
Übergeordneter
ebd0733c
Keine zugehörigen Branchen gefunden
Keine zugehörigen Tags gefunden
Keine zugehörigen Merge Requests gefunden
Änderungen
2
Leerzeichenänderungen ausblenden
Inline
Nebeneinander
2 geänderte Dateien
src/QUI/ERP/Order/ProcessingStatus/Factory.php
+6
-4
6 Ergänzungen, 4 Löschungen
src/QUI/ERP/Order/ProcessingStatus/Factory.php
src/QUI/ERP/Order/ProcessingStatus/Handler.php
+25
-11
25 Ergänzungen, 11 Löschungen
src/QUI/ERP/Order/ProcessingStatus/Handler.php
werden angezeigt
mit
31 Ergänzungen
und
15 Löschungen
src/QUI/ERP/Order/ProcessingStatus/Factory.php
+
6
−
4
Zeige Datei @
22920f9e
...
...
@@ -22,20 +22,22 @@ class Factory extends QUI\Utils\Singleton
* @param string|integer $id - processing ID
* @param string $color - color of the status
* @param array $title - title
*
* @throws Exception
* @throws QUI\Exception
* @todo permissions
*/
public
function
createProcessingStatus
(
$id
,
$color
,
array
$title
)
{
$list
=
Handler
::
getInstance
()
->
getList
();
$id
=
(
int
)
$id
;
$data
=
array
()
;
$data
=
[]
;
if
(
isset
(
$list
[
$id
]))
{
throw
new
Exception
(
array
(
throw
new
Exception
(
[
'quiqqer/order'
,
'exception.processStatus.exists'
)
);
]
);
}
// config
...
...
@@ -62,7 +64,7 @@ public function createProcessingStatus($id, $color, array $title)
QUI\Translator
::
addUserVar
(
'quiqqer/order'
,
'processing.status.'
.
$id
,
'processing.status.'
.
$id
,
$data
);
...
...
Dieser Diff ist reduziert.
Zum Erweitern klicken.
src/QUI/ERP/Order/ProcessingStatus/Handler.php
+
25
−
11
Zeige Datei @
22920f9e
...
...
@@ -34,12 +34,19 @@ public function getList()
return
$this
->
list
;
}
$Package
=
QUI
::
getPackage
(
'quiqqer/order'
);
$Config
=
$Package
->
getConfig
();
$result
=
$Config
->
getSection
(
'processing_status'
);
try
{
$Package
=
QUI
::
getPackage
(
'quiqqer/order'
);
$Config
=
$Package
->
getConfig
();
$result
=
$Config
->
getSection
(
'processing_status'
);
}
catch
(
QUI\Exception
$Exception
)
{
QUI\System\Log
::
writeException
(
$Exception
);
return
[];
}
if
(
!
$result
||
!
is_array
(
$result
))
{
$this
->
list
=
array
();
$this
->
list
=
[];
return
$this
->
list
;
}
...
...
@@ -56,7 +63,7 @@ public function getList()
public
function
getProcessingStatusList
()
{
$list
=
$this
->
getList
();
$result
=
array
()
;
$result
=
[]
;
foreach
(
$list
as
$entry
=>
$color
)
{
try
{
...
...
@@ -73,6 +80,8 @@ public function getProcessingStatusList()
*
* @param $id
* @return Status
*
* @throws Exception
*/
public
function
getProcessingStatus
(
$id
)
{
...
...
@@ -84,6 +93,9 @@ public function getProcessingStatus($id)
*
* @param string|int $id
*
* @throws Exception
* @throws QUI\Exception
*
* @todo permissions
*/
public
function
deleteProcessingStatus
(
$id
)
...
...
@@ -93,7 +105,7 @@ public function deleteProcessingStatus($id)
// remove translation
QUI\Translator
::
delete
(
'quiqqer/order'
,
'processing.status.'
.
$Status
->
getId
()
'processing.status.'
.
$Status
->
getId
()
);
QUI\Translator
::
publish
(
'quiqqer/order'
);
...
...
@@ -113,6 +125,8 @@ public function deleteProcessingStatus($id)
* @param int|string $color
* @param array $title
*
* @throws QUI\Exception
*
* @todo permissions
*/
public
function
updateProcessingStatus
(
$id
,
$color
,
array
$title
)
...
...
@@ -122,22 +136,22 @@ public function updateProcessingStatus($id, $color, array $title)
// update translation
$languages
=
QUI
::
availableLanguages
();
$data
=
array
(
$data
=
[
'package'
=>
'quiqqer/order'
,
'datatype'
=>
'php,js'
,
'html'
=>
1
)
;
]
;
foreach
(
$languages
as
$language
)
{
if
(
isset
(
$title
[
$language
]))
{
$data
[
$language
]
=
$title
[
$language
];
$data
[
$language
.
'_edit'
]
=
$title
[
$language
];
$data
[
$language
]
=
$title
[
$language
];
$data
[
$language
.
'_edit'
]
=
$title
[
$language
];
}
}
QUI\Translator
::
edit
(
'quiqqer/order'
,
'processing.status.'
.
$Status
->
getId
(),
'processing.status.'
.
$Status
->
getId
(),
'quiqqer/order'
,
$data
);
...
...
Dieser Diff ist reduziert.
Zum Erweitern klicken.
Vorschau
0%
Lade
Wiederholen
oder
Neue Datei anhängen
.
Abbrechen
You are about to add
0
people
to the discussion. Proceed with caution.
Bearbeitung dieser Nachricht zuerst beenden!
Kommentar speichern
Abbrechen
Bitte
registrieren
oder
Anmelden
zum Kommentieren