Skip to content

Commit ecf0f13

Browse files
committed
Add nullDefault() method
This will prevent php stan from detecting an error when using the fields nullDefault attribute
1 parent abc6162 commit ecf0f13

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/Html/Editor/Fields/Field.php

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -360,4 +360,18 @@ public function getType(): string
360360
{
361361
return $this->type;
362362
}
363+
364+
/**
365+
* Replace null values with the field's default on edit.
366+
*
367+
* @param bool $value
368+
* @return $this
369+
* @see https://editor.datatables.net/reference/option/fields.nullDefault
370+
*/
371+
public function nullDefault(bool $value = true): static
372+
{
373+
$this->attributes['nullDefault'] = $value;
374+
375+
return $this;
376+
}
363377
}

0 commit comments

Comments
 (0)