From c0a3a0f72057cd13194f5cd113768dc88eeeeb9d Mon Sep 17 00:00:00 2001 From: Awilum Date: Sat, 23 Feb 2019 00:31:28 +0300 Subject: [PATCH] Flextype Core: New Fieldsets API - improvements --- flextype/Fieldsets.php | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/flextype/Fieldsets.php b/flextype/Fieldsets.php index 42a4bafa..55187844 100644 --- a/flextype/Fieldsets.php +++ b/flextype/Fieldsets.php @@ -22,7 +22,15 @@ use function Flextype\Component\I18n\__; class Fieldsets { - public static function fetchForm(array $fieldsets, array $values = []) : string + /** + * Fetch Fieldset form + * + * @access public + * @param array $fieldset Fieldset + * @param string $values Fieldset values + * @return string Returns form based on fieldsets + */ + public static function fetchForm(array $fieldset, array $values = []) : string { $form = ''; @@ -30,11 +38,11 @@ class Fieldsets $form .= Form::hidden('token', Token::generate()); $form .= Form::hidden('action', 'save-form'); - if (count($fieldsets['sections']) > 0) { + if (count($fieldset['sections']) > 0) { $form .= '