trait RuleChainManagerTrait in ThemeKey 8
Hierarchy
- trait \Drupal\themekey\RuleChainManagerTrait
3 files declare their use of RuleChainManagerTrait
- ConfigImportEventSubscriber.php in src/
EventSubscriber/ ConfigImportEventSubscriber.php - Engine.php in src/
Engine/ Engine.php - ThemeKeyRuleChainForm.php in src/
Form/ ThemeKeyRuleChainForm.php
File
- src/
RuleChainManagerTrait.php, line 7
Namespace
Drupal\themekeyView source
trait RuleChainManagerTrait {
/**
* @var
*/
private $ruleChainManager;
/**
* Gets the ThemeKey Rule Chain manager.
*
* @return \Drupal\themekey\RuleChainManagerInterface
* The ThemeKey Rule Chain manager.
*/
protected function getRuleChainManager() {
if (!$this->ruleChainManager) {
$this->ruleChainManager = \Drupal::service('themekey.rule_chain_manager');
}
return $this->ruleChainManager;
}
/**
* Sets the ThemeKey Rule Chain manager to use.
*
* @param \Drupal\themekey\RuleChainManagerInterface
* The ThemeKey Rule Chain manager.
*
* @return $this
*/
public function setRuleChainManager(RuleChainManagerInterface $ruleChainManager) {
$this->ruleChainManager = $ruleChainManager;
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
RuleChainManagerTrait:: |
private | property | @var | |
RuleChainManagerTrait:: |
protected | function | Gets the ThemeKey Rule Chain manager. | 1 |
RuleChainManagerTrait:: |
public | function | Sets the ThemeKey Rule Chain manager to use. |