You are here

public function PatternDefinition::getVariant in UI Patterns 8

Get variant.

Parameters

string $name: Field name.

Return value

PatternDefinitionField|null Definition field.

File

src/Definition/PatternDefinition.php, line 330

Class

PatternDefinition
Class PatternDefinition.

Namespace

Drupal\ui_patterns\Definition

Code

public function getVariant($name) {
  return $this
    ->hasVariant($name) ? $this->definition['variants'][$name] : NULL;
}