You are here

public function TawkToConditionPluginsHandler::__construct in Tawk.to - Live chat application (Drupal 8) 8

Same name and namespace in other branches
  1. 8.2 src/Service/TawkToConditionPluginsHandler.php \Drupal\tawk_to\Service\TawkToConditionPluginsHandler::__construct()

Constructs the tawk.to access control handler instance.

Parameters

\Drupal\Core\Config\ConfigFactoryInterface $configFactory: The factory for configuration objects.

\Drupal\Core\Plugin\Context\ContextHandlerInterface $contextHandler: The ContextHandler for applying contexts to conditions properly.

\Drupal\Core\Plugin\Context\ContextRepositoryInterface $contextRepository: The lazy context repository service.

\Drupal\Core\Executable\ExecutableManagerInterface $manager: The ConditionManager for building the visibility UI.

File

src/Service/TawkToConditionPluginsHandler.php, line 60

Class

TawkToConditionPluginsHandler
Defines the condition plugins handler.

Namespace

Drupal\tawk_to\Service

Code

public function __construct(ConfigFactoryInterface $configFactory, ContextHandlerInterface $contextHandler, ContextRepositoryInterface $contextRepository, ExecutableManagerInterface $manager) {
  $this->tawkToVisibility = $configFactory
    ->get('tawk_to.settings')
    ->get('visibility');
  $this->contextHandler = $contextHandler;
  $this->contextRepository = $contextRepository;
  $this->manager = $manager;
}