trait BlazyAdminTrait in Blazy 7
A Trait common for blazy-related plugins.
Provides objects which cannot be instatiated with a DI for when the classes are instantiated/ locked within procedural functions such as Views hooks.
Hierarchy
- trait \Drupal\blazy\Form\BlazyAdminTrait
2 files declare their use of BlazyAdminTrait
- BlazyViews.php in src/
Plugin/ views/ style/ BlazyViews.php - BlazyViewsFieldPluginBase.php in src/
Plugin/ views/ field/ BlazyViewsFieldPluginBase.php
File
- src/
Form/ BlazyAdminTrait.php, line 11
Namespace
Drupal\blazy\FormView source
trait BlazyAdminTrait {
/**
* The blazy admin service.
*
* @var \Drupal\blazy\Form\BlazyAdmin
*/
protected $admin;
/**
* Returns the blazy admin service.
*/
public function admin() {
if (!isset($this->admin)) {
$this->admin = new BlazyAdmin($this
->manager());
}
return $this->admin;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
BlazyAdminTrait:: |
protected | property | The blazy admin service. | |
BlazyAdminTrait:: |
public | function | Returns the blazy admin service. |