public function PatternDefinition::getVariantDefinition in UI Patterns 8
Factory method: create a new variant definition.
Parameters
string $name: Variant name.
string $value: Variant value.
Return value
\Drupal\ui_patterns\Definition\PatternDefinitionVariant Definition instance.
2 calls to PatternDefinition::getVariantDefinition()
- PatternDefinition::setVariant in src/
Definition/ PatternDefinition.php - Set variant.
- PatternDefinition::setVariants in src/
Definition/ PatternDefinition.php - Setter.
File
- src/
Definition/ PatternDefinition.php, line 645
Class
- PatternDefinition
- Class PatternDefinition.
Namespace
Drupal\ui_patterns\DefinitionCode
public function getVariantDefinition($name, $value) {
return new PatternDefinitionVariant($name, $value);
}