diff --git a/src/Builder.php b/src/Builder.php index d6e1bc7..b432e4c 100644 --- a/src/Builder.php +++ b/src/Builder.php @@ -45,6 +45,7 @@ * @method FieldBuilder addOembed(string $name, array $args = []) * @method FieldBuilder addPageLink(string $name, array $args = []) * @method FieldBuilder addPartial(string $partial) + * @method FieldBuilder addPartials(array $partials) * @method FieldBuilder addPassword(string $name, array $args = []) * @method FieldBuilder addPostObject(string $name, array $args = []) * @method FieldBuilder addRange(string $name, array $args = []) @@ -104,6 +105,18 @@ public function addPartial(string $partial): self return $this->addFields($partial); } + /** + * Add multiple partials to the field group. + */ + public function addPartials(array $partials): self + { + foreach ($partials as $partial) { + $this->addPartial($partial); + } + + return $this; + } + /** * Retrieve the custom field types. */ diff --git a/src/Builder/AccordionBuilder.php b/src/Builder/AccordionBuilder.php index 2482a66..8ea4659 100644 --- a/src/Builder/AccordionBuilder.php +++ b/src/Builder/AccordionBuilder.php @@ -32,6 +32,7 @@ * @method FieldBuilder addOembed(string $name, array $args = []) * @method FieldBuilder addPageLink(string $name, array $args = []) * @method FieldBuilder addPartial(string $partial) + * @method FieldBuilder addPartials(array $partials) * @method FieldBuilder addPassword(string $name, array $args = []) * @method FieldBuilder addPostObject(string $name, array $args = []) * @method FieldBuilder addRange(string $name, array $args = []) diff --git a/src/Builder/ChoiceFieldBuilder.php b/src/Builder/ChoiceFieldBuilder.php index 0b28f27..b852426 100644 --- a/src/Builder/ChoiceFieldBuilder.php +++ b/src/Builder/ChoiceFieldBuilder.php @@ -32,6 +32,7 @@ * @method FieldBuilder addOembed(string $name, array $args = []) * @method FieldBuilder addPageLink(string $name, array $args = []) * @method FieldBuilder addPartial(string $partial) + * @method FieldBuilder addPartials(array $partials) * @method FieldBuilder addPassword(string $name, array $args = []) * @method FieldBuilder addPostObject(string $name, array $args = []) * @method FieldBuilder addRange(string $name, array $args = []) diff --git a/src/Builder/FieldBuilder.php b/src/Builder/FieldBuilder.php index ce8e745..87af772 100644 --- a/src/Builder/FieldBuilder.php +++ b/src/Builder/FieldBuilder.php @@ -35,6 +35,7 @@ * @method FieldBuilder addOembed(string $name, array $args = []) * @method FieldBuilder addPageLink(string $name, array $args = []) * @method FieldBuilder addPartial(string $partial) + * @method FieldBuilder addPartials(array $partials) * @method FieldBuilder addPassword(string $name, array $args = []) * @method FieldBuilder addPostObject(string $name, array $args = []) * @method FieldBuilder addRange(string $name, array $args = []) diff --git a/src/Builder/FlexibleContentBuilder.php b/src/Builder/FlexibleContentBuilder.php index 0c18f2a..a6da9e0 100644 --- a/src/Builder/FlexibleContentBuilder.php +++ b/src/Builder/FlexibleContentBuilder.php @@ -36,6 +36,7 @@ * @method FieldBuilder addOembed(string $name, array $args = []) * @method FieldBuilder addPageLink(string $name, array $args = []) * @method FieldBuilder addPartial(string $partial) + * @method FieldBuilder addPartials(array $partials) * @method FieldBuilder addPassword(string $name, array $args = []) * @method FieldBuilder addPostObject(string $name, array $args = []) * @method FieldBuilder addRange(string $name, array $args = []) diff --git a/src/Builder/GroupBuilder.php b/src/Builder/GroupBuilder.php index 8ccf1f2..3dabd69 100644 --- a/src/Builder/GroupBuilder.php +++ b/src/Builder/GroupBuilder.php @@ -34,6 +34,7 @@ * @method FieldBuilder addOembed(string $name, array $args = []) * @method FieldBuilder addPageLink(string $name, array $args = []) * @method FieldBuilder addPartial(string $partial) + * @method FieldBuilder addPartials(array $partials) * @method FieldBuilder addPassword(string $name, array $args = []) * @method FieldBuilder addPostObject(string $name, array $args = []) * @method FieldBuilder addRange(string $name, array $args = []) diff --git a/src/Builder/RepeaterBuilder.php b/src/Builder/RepeaterBuilder.php index 80455fc..1cadfd4 100644 --- a/src/Builder/RepeaterBuilder.php +++ b/src/Builder/RepeaterBuilder.php @@ -34,6 +34,7 @@ * @method FieldBuilder addOembed(string $name, array $args = []) * @method FieldBuilder addPageLink(string $name, array $args = []) * @method FieldBuilder addPartial(string $partial) + * @method FieldBuilder addPartials(array $partials) * @method FieldBuilder addPassword(string $name, array $args = []) * @method FieldBuilder addPostObject(string $name, array $args = []) * @method FieldBuilder addRange(string $name, array $args = []) diff --git a/src/Builder/TabBuilder.php b/src/Builder/TabBuilder.php index 6ed8fb6..a05165f 100644 --- a/src/Builder/TabBuilder.php +++ b/src/Builder/TabBuilder.php @@ -32,6 +32,7 @@ * @method FieldBuilder addOembed(string $name, array $args = []) * @method FieldBuilder addPageLink(string $name, array $args = []) * @method FieldBuilder addPartial(string $partial) + * @method FieldBuilder addPartials(array $partials) * @method FieldBuilder addPassword(string $name, array $args = []) * @method FieldBuilder addPostObject(string $name, array $args = []) * @method FieldBuilder addRange(string $name, array $args = [])