trait OperatorManagerTrait in ThemeKey 8
Hierarchy
- trait \Drupal\themekey\OperatorManagerTrait
2 files declare their use of OperatorManagerTrait
- Engine.php in src/
Engine/ Engine.php - ThemeKeyRuleForm.php in src/
Form/ ThemeKeyRuleForm.php - Contains Drupal\themekey\Form\ThemeKeyRuleForm.
File
- src/
OperatorManagerTrait.php, line 7
Namespace
Drupal\themekeyView source
trait OperatorManagerTrait {
/**
* @var
*/
private $operatorManager;
/**
* Gets the ThemeKey Operator manager.
*
* @return \Drupal\Component\Plugin\PluginManagerInterface
* The ThemeKey Operator manager.
*/
protected function getOperatorManager() {
if (!$this->operatorManager) {
$this->operatorManager = \Drupal::service('plugin.manager.themekey.operator');
}
return $this->operatorManager;
}
/**
* Sets the ThemeKey Property manager to use.
*
* @param \Drupal\Component\Plugin\PluginManagerInterface
* The ThemeKey Property manager.
*
* @return $this
*/
public function setOperatorManager(PluginManagerInterface $operatorManager) {
$this->operatorManager = $operatorManager;
return $this;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
OperatorManagerTrait:: |
private | property | @var | |
OperatorManagerTrait:: |
protected | function | Gets the ThemeKey Operator manager. | |
OperatorManagerTrait:: |
public | function | Sets the ThemeKey Property manager to use. |