diff --git a/src/EntityList/Fields/EntityListFieldsContainer.php b/src/EntityList/Fields/EntityListFieldsContainer.php index 47158b7cf..03a132e19 100644 --- a/src/EntityList/Fields/EntityListFieldsContainer.php +++ b/src/EntityList/Fields/EntityListFieldsContainer.php @@ -3,9 +3,12 @@ namespace Code16\Sharp\EntityList\Fields; use Illuminate\Support\Collection; +use Illuminate\Support\Traits\Conditionable; class EntityListFieldsContainer { + use Conditionable; + protected array $fields = []; final public function addField(EntityListField $field): self diff --git a/src/Form/Layout/FormLayout.php b/src/Form/Layout/FormLayout.php index 43b394618..2862b622c 100644 --- a/src/Form/Layout/FormLayout.php +++ b/src/Form/Layout/FormLayout.php @@ -2,8 +2,12 @@ namespace Code16\Sharp\Form\Layout; +use Illuminate\Support\Traits\Conditionable; + class FormLayout implements HasLayout { + use Conditionable; + protected array $tabs = []; protected bool $tabbed = true; diff --git a/src/Form/Layout/HasFieldRows.php b/src/Form/Layout/HasFieldRows.php index 25bdf4bf3..71f3b259f 100644 --- a/src/Form/Layout/HasFieldRows.php +++ b/src/Form/Layout/HasFieldRows.php @@ -3,9 +3,12 @@ namespace Code16\Sharp\Form\Layout; use Code16\Sharp\Utils\Layout\LayoutField; +use Illuminate\Support\Traits\Conditionable; trait HasFieldRows { + use Conditionable; + protected array $rows = []; public function withSingleField(string $fieldKey, \Closure $subLayoutCallback = null): self diff --git a/src/Show/Layout/ShowLayout.php b/src/Show/Layout/ShowLayout.php index 02efc30e3..3b6d8f131 100644 --- a/src/Show/Layout/ShowLayout.php +++ b/src/Show/Layout/ShowLayout.php @@ -3,9 +3,12 @@ namespace Code16\Sharp\Show\Layout; use Code16\Sharp\Form\Layout\HasLayout; +use Illuminate\Support\Traits\Conditionable; class ShowLayout implements HasLayout { + use Conditionable; + protected array $sections = []; final public function addSection(string $label, \Closure $callback = null): self diff --git a/src/Utils/Fields/FieldsContainer.php b/src/Utils/Fields/FieldsContainer.php index ab6ddf667..fbece4ab4 100644 --- a/src/Utils/Fields/FieldsContainer.php +++ b/src/Utils/Fields/FieldsContainer.php @@ -4,9 +4,12 @@ use Code16\Sharp\Form\Fields\SharpFormField; use Code16\Sharp\Show\Fields\SharpShowField; +use Illuminate\Support\Traits\Conditionable; class FieldsContainer { + use Conditionable; + protected array $fields = []; public function addField(SharpFormField|SharpShowField $field): self