class TestBlockVariantTrait
Same name in other branches
- 4.0.x tests/src/Unit/BlockVariantTraitTest.php \Drupal\Tests\ctools\Unit\TestBlockVariantTrait
Hierarchy
- class \Drupal\Tests\ctools\Unit\TestBlockVariantTrait uses \Drupal\ctools\Plugin\BlockVariantTrait
Expanded class hierarchy of TestBlockVariantTrait
File
-
tests/
src/ Unit/ BlockVariantTraitTest.php, line 86
Namespace
Drupal\Tests\ctools\UnitView source
class TestBlockVariantTrait {
use BlockVariantTrait;
/**
* @var array
*/
protected $blockConfig = [];
/**
* @var \Drupal\Component\Uuid\UuidInterface
*/
protected $uuidGenerator;
/**
* @param \Drupal\ctools\Plugin\BlockPluginCollection $block_plugin_collection
*
* @return $this
*/
public function setBlockPluginCollection(BlockPluginCollection $block_plugin_collection) {
$this->blockPluginCollection = $block_plugin_collection;
return $this;
}
/**
* @param \Drupal\Component\Uuid\UuidInterface $uuid_generator
*
* @return $this
*/
public function setUuidGenerator(UuidInterface $uuid_generator) {
$this->uuidGenerator = $uuid_generator;
return $this;
}
/**
* {@inheritdoc}
*/
protected function uuidGenerator() {
return $this->uuidGenerator;
}
/**
* Sets the block configuration.
*
* @param array $config
* The block configuration.
*
* @return $this
*/
public function setBlockConfig(array $config) {
$this->blockConfig = $config;
return $this;
}
/**
* {@inheritdoc}
*/
protected function getBlockConfig() {
return $this->blockConfig;
}
/**
* {@inheritdoc}
*/
public function getRegionNames() {
return [
'top' => 'Top',
'bottom' => 'Bottom',
];
}
}