You are here

public function ApiBase::__construct in FormAssembly 8

ApiBase constructor. No matching create() method - used to build services.

Parameters

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

\Drupal\formassembly\LoggerInterface $loggerChannel: Injected logging service.

3 calls to ApiBase::__construct()
ApiAuthorize::__construct in src/ApiAuthorize.php
ApiAuthorize constructor.
ApiMarkup::__construct in src/ApiMarkup.php
ApiSync constructor.
ApiSync::__construct in src/ApiSync.php
ApiSync constructor.
3 methods override ApiBase::__construct()
ApiAuthorize::__construct in src/ApiAuthorize.php
ApiAuthorize constructor.
ApiMarkup::__construct in src/ApiMarkup.php
ApiSync constructor.
ApiSync::__construct in src/ApiSync.php
ApiSync constructor.

File

src/ApiBase.php, line 74

Class

ApiBase
Base class for Api Objects.

Namespace

Drupal\formassembly

Code

public function __construct(ConfigFactory $config_factory, LoggerInterface $loggerChannel) {
  $this->configFactory = $config_factory;
  $this->logger = $loggerChannel;
  $config = $this->configFactory
    ->get('formassembly.api.oauth');
  $this->isAdmin = $config
    ->get('admin_index');
}