1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889 |
- <?php
- namespace Core\App\Service;
- class SettingsService
- {
- protected $settingsRepository;
- public function __construct(
- \Core\App\Repository\Marketplace\SettingsInterface $settingsRepository
- )
- {
- $this->settingsRepository = $settingsRepository;
- }
-
- public function getSyncDataTypes()
- {
- return $this->settingsRepository->getSyncDataTypes();
- }
- public function getPdlGestiuni(\Core\App\Repository\Facturis\StockInterface $facturisStockRepository)
- {
- return $facturisStockRepository->getPdlGestiuni();
- }
- public function getOptions()
- {
- return $this->settingsRepository->getSyncOptions();
- }
- public function getAuth()
- {
- return $this->settingsRepository->getSyncAuth();
- }
- public function testAuth(\Core\App\Repository\Facturis\StockInterface $facturisStockRepository)
- {
- $facturisStockRepository->testAuth();
- }
- public function getVersionLink()
- {
- return $this->settingsRepository->getVersionLink();
- }
- public function getVersion()
- {
- return $this->settingsRepository->getVersion();
- }
- public function getSyncOrdersAs()
- {
- return $this->settingsRepository->getSyncOrdersAs();
- }
- public function getAutoSyncOptions()
- {
- return $this->settingsRepository->getAutoSyncOptions();
- }
- public function getEnabledDisabledOptions()
- {
- return $this->settingsRepository->getEnabledDisabledOptions();
- }
- public function showTutorial()
- {
- $authData = $this->settingsRepository->getSyncAuth();
- if(
- empty($authData['fsync_auth_apikey']) ||
- empty($authData['fsync_auth_username']) ||
- empty($authData['fsync_auth_password']) ||
- empty($authData['fsync_auth_fiscalcode'])
- )
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- public function checkLatestVersion($language)
- {
- $this->settingsRepository->checkLatestVersion($language);
- }
- }
|