public function PatternDefinition::setFields in UI Patterns 8
Setter.
Parameters
array $fields: Property value.
Return value
$this
1 call to PatternDefinition::setFields()
- PatternDefinition::__construct in src/
Definition/ PatternDefinition.php - PatternDefinition constructor.
File
- src/
Definition/ PatternDefinition.php, line 222
Class
- PatternDefinition
- Class PatternDefinition.
Namespace
Drupal\ui_patterns\DefinitionCode
public function setFields(array $fields) {
foreach ($fields as $name => $value) {
$field = $this
->getFieldDefinition($name, $value);
$this->definition['fields'][$field
->getName()] = $field;
}
return $this;
}