-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[WIP][FEATURE] Synchronization status
- Loading branch information
1 parent
c0c70f2
commit 8cb739b
Showing
2 changed files
with
62 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace AawTeam\BackendRoles\Role; | ||
|
||
/* | ||
* Copyright by Agentur am Wasser | Maeder & Partner AG | ||
* | ||
* For the full copyright and license information, please read the | ||
* LICENSE file that was distributed with this source code. | ||
* | ||
* The TYPO3 project - inspiring people to share! | ||
*/ | ||
|
||
use AawTeam\BackendRoles\Exception\RoleDefinitionException; | ||
use TYPO3\CMS\Extbase\Utility\DebuggerUtility; | ||
|
||
/** | ||
* SynchronizationStatus | ||
*/ | ||
class SynchronizationStatus | ||
{ | ||
public const NOT_SYNCED = 0; | ||
public const OUT_OF_SYNC = 1; | ||
public const SYNC_OK = 2; | ||
|
||
public function typeIconUserFunction(array $parameters): string | ||
{ | ||
$row = $parameters['row']; | ||
return 'actions-synchronize'; | ||
return 'status-user-admin'; | ||
} | ||
|
||
// protected int $status; | ||
|
||
// public function __construct(int $status) | ||
// { | ||
// if (!in_array($status, [self::NOT_SYNCED, self::OUT_OF_SYNC, self::SYNC_OK])) { | ||
// throw new \InvalidArgumentException('Invalid status: ' . $status); | ||
// } | ||
// $this->status = $status; | ||
// } | ||
|
||
// public function isSynced(): bool | ||
// { | ||
// $this->status !== self::NOT_SYNCED; | ||
// } | ||
|
||
// public function isOutOfSync(): bool | ||
// { | ||
// $this->status === self::OUT_OF_SYNC; | ||
// } | ||
|
||
// public function isSyncOk(): bool | ||
// { | ||
// $this->status === self::SYNC_OK; | ||
// } | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters