You are here

public function ApiSync::__construct in FormAssembly 8

ApiSync constructor.

Parameters

\Drupal\Core\Config\ConfigFactory $config_factory: Injected config service.

\Psr\Log\LoggerInterface $loggerChannel: Injected service. Injected service.

\GuzzleHttp\Client $http_client: Injected Guzzle client.

\Drupal\Core\Entity\EntityTypeManagerInterface $entity_type_manager: Injected entity type service.

\Drupal\formassembly\ApiAuthorize $authorize: Injected api service.

\Drupal\Core\Cache\CacheBackendInterface $cacheBackend: Injected service.

Throws

\Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException

\Drupal\Component\Plugin\Exception\PluginNotFoundException

Overrides ApiBase::__construct

File

src/ApiSync.php, line 99

Class

ApiSync
Service class for FormAssembly API: Handles form sync.

Namespace

Drupal\formassembly

Code

public function __construct(ConfigFactory $config_factory, LoggerInterface $loggerChannel, Client $http_client, EntityTypeManagerInterface $entity_type_manager, ApiAuthorize $authorize, CacheBackendInterface $cacheBackend) {
  parent::__construct($config_factory, $loggerChannel);
  $this->httpClient = $http_client;
  $this->faStorage = $entity_type_manager
    ->getStorage('fa_form');
  $this->authorize = $authorize;
  $this->cache = $cacheBackend;
  $this->forms = [];
  $this->page = 1;
  $this->lastHash = '';
}