You are here

public function PatternDefinition::hasVariant in UI Patterns 8

Check whereas variant exists.

Parameters

string $name: Variant name.

Return value

bool Whereas variant exists

1 call to PatternDefinition::hasVariant()
PatternDefinition::getVariant in src/Definition/PatternDefinition.php
Get variant.

File

src/Definition/PatternDefinition.php, line 343

Class

PatternDefinition
Class PatternDefinition.

Namespace

Drupal\ui_patterns\Definition

Code

public function hasVariant($name) {
  return isset($this->definition['variants'][$name]);
}