function RulesComponentRepository::__construct

Constructs the object.

Parameters

\Drupal\Core\Cache\CacheBackendInterface $cache_backend: The cache backend.

\Drupal\Core\Language\LanguageManagerInterface $language_manager: The language manager.

File

src/Engine/RulesComponentRepository.php, line 59

Class

RulesComponentRepository
Provides an implementation of the component repository service.

Namespace

Drupal\rules\Engine

Code

public function __construct(CacheBackendInterface $cache_backend, LanguageManagerInterface $language_manager) {
    $this->cacheBackend = $cache_backend;
    $this->languageManager = $language_manager;
    $this->langcode = $this->languageManager
        ->getCurrentLanguage()
        ->getId();
}