You are here

public function TrumbaBlockBase::__construct in Trumba 2.x

Same name and namespace in other branches
  1. 8 src/Plugin/Block/TrumbaBlockBase.php \Drupal\trumba\Plugin\Block\TrumbaBlockBase::__construct()

Overrides BlockPluginTrait::__construct

File

src/Plugin/Block/TrumbaBlockBase.php, line 40

Class

TrumbaBlockBase
Defines a base block implementation that Trumba blocks plugins will extend.

Namespace

Drupal\trumba\Plugin\Block

Code

public function __construct(array $configuration, $plugin_id, $plugin_definition, CacheTagsInvalidator $cacheInvalidator, UuidInterface $uuid_service) {
  parent::__construct($configuration, $plugin_id, $plugin_definition);
  $this->defaultTrumbaWebName = \Drupal::config('trumba.trumbaconfiguration')
    ->get('default_web_name');
  $this->spudId = $this
    ->getBaseId() . '-' . $uuid_service
    ->generate();
  $this->cacheInvalidator = $cacheInvalidator;
}