Skip to content
Snippets Groups Projects

Resolve #3110831 "Cannot un disable a 10 3"

5 files
+ 112
0
Compare changes
  • Side-by-side
  • Inline
Files
5
@@ -151,4 +151,19 @@ public function disableField(ResourceTypeField $field) {
}
}
/**
* Enables the given field on the resource type to be built.
*
* @param \Drupal\jsonapi\ResourceType\ResourceTypeField $field
* The field for which to set a public name.
*/
public function enableField(ResourceTypeField $field): void {
foreach ($this->fields as $index => $value) {
if ($field === $value) {
$this->fields[$index] = $value->enabled();
return;
}
}
}
}
Loading