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