class TestVariantCollectionTrait
Same name in other branches
- 4.0.x tests/src/Unit/VariantCollectionTraitTest.php \Drupal\Tests\ctools\Unit\TestVariantCollectionTrait
Hierarchy
- class \Drupal\Tests\ctools\Unit\TestVariantCollectionTrait uses \Drupal\ctools\Plugin\VariantCollectionTrait
Expanded class hierarchy of TestVariantCollectionTrait
File
-
tests/
src/ Unit/ VariantCollectionTraitTest.php, line 161
Namespace
Drupal\Tests\ctools\UnitView source
class TestVariantCollectionTrait {
use VariantCollectionTrait;
/**
* @var array
*/
protected $variantConfig = [];
/**
* @var \Drupal\Component\Uuid\UuidInterface
*/
protected $uuidGenerator;
/**
* @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 variant configuration.
*
* @param array $config
* The variant configuration.
*
* @return $this
*/
public function setVariantConfig(array $config) {
$this->variantConfig = $config;
return $this;
}
/**
* {@inheritdoc}
*/
protected function getVariantConfig() {
return $this->variantConfig;
}
}
Members
Title Sort descending | Modifiers | Object type | Summary | Overriden Title |
---|---|---|---|---|
TestVariantCollectionTrait::$uuidGenerator | protected | property | ||
TestVariantCollectionTrait::$variantConfig | protected | property | ||
TestVariantCollectionTrait::getVariantConfig | protected | function | Returns the configuration for stored variants. | Overrides VariantCollectionTrait::getVariantConfig |
TestVariantCollectionTrait::setUuidGenerator | public | function | ||
TestVariantCollectionTrait::setVariantConfig | public | function | Sets the variant configuration. | |
TestVariantCollectionTrait::uuidGenerator | protected | function | Returns the UUID generator. | Overrides VariantCollectionTrait::uuidGenerator |
VariantCollectionTrait::$variantCollection | protected | property | The plugin collection that holds the variants. | |
VariantCollectionTrait::addVariant | public | function | ||
VariantCollectionTrait::getVariant | public | function | ||
VariantCollectionTrait::getVariants | public | function | ||
VariantCollectionTrait::removeVariant | public | function |