public function PatternDefinition::setVariant in UI Patterns 8
Set variant.
Parameters
string $name: Variant name.
string $label: Variant label.
Return value
$this
File
- src/
Definition/ PatternDefinition.php, line 357
Class
- PatternDefinition
- Class PatternDefinition.
Namespace
Drupal\ui_patterns\DefinitionCode
public function setVariant($name, $label) {
$this->definition['variants'][$name] = $this
->getVariantDefinition($name, $label);
return $this;
}