RuleChainManagerTrait.php in ThemeKey 8
File
src/RuleChainManagerTrait.php
View source
<?php
namespace Drupal\themekey;
use Drupal\themekey\RuleChainManagerInterface;
trait RuleChainManagerTrait {
private $ruleChainManager;
protected function getRuleChainManager() {
if (!$this->ruleChainManager) {
$this->ruleChainManager = \Drupal::service('themekey.rule_chain_manager');
}
return $this->ruleChainManager;
}
public function setRuleChainManager(RuleChainManagerInterface $ruleChainManager) {
$this->ruleChainManager = $ruleChainManager;
return $this;
}
}