123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105 |
- <?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 getPdls(\Core\App\Repository\Facturis\StockInterface $facturisStockRepository)
- {
- return $facturisStockRepository->getPdls();
- }
- 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 getDocUpdOptions()
- {
- return $this->settingsRepository->getDocUpdOptions();
- }
- public function getShowObsOptions()
- {
- return $this->settingsRepository->getShowObsOptions();
- }
- public function checkLatestVersion($language)
- {
- $this->settingsRepository->checkLatestVersion($language);
- }
- 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;
- }
- }
- }
|