public function PatternContext::__construct in UI Patterns 8
PatternContext constructor.
Parameters
string $type: Pattern context type.
array $values: Initial context values.
File
- src/
Element/ PatternContext.php, line 34
Class
- PatternContext
- Class PatternContext.
Namespace
Drupal\ui_patterns\ElementCode
public function __construct($type, array $values = []) {
$this->type = $type;
unset($values['type']);
foreach ($values as $name => $value) {
$this
->setProperty($name, $value);
}
}