From d20f1867c1a2e92c4ca58e3913cbc1074e55eef4 Mon Sep 17 00:00:00 2001 From: Awilum Date: Sun, 25 Aug 2019 12:48:15 +0300 Subject: [PATCH] feat(core): add mediaSelectField - Forms #218 #186 --- flextype/core/Forms.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/flextype/core/Forms.php b/flextype/core/Forms.php index 5e4d1d6c..f829ecf7 100644 --- a/flextype/core/Forms.php +++ b/flextype/core/Forms.php @@ -152,7 +152,7 @@ class Forms break; // Media select field case 'media_select': - $form_element = Form::select($form_element_name, $this->getMediaList($request->getQueryParams()['id'], false), $form_value, $property['attributes']); + $form_element = $this->mediaSelectField($form_element_name, $this->getMediaList($request->getQueryParams()['id'], false), $form_value, $property['attributes']); break; // Simple text-input, for single-line fields. default: @@ -179,6 +179,11 @@ class Forms return $form; } + protected function mediaSelectField($name, $options, $value, $attributes) + { + return Form::select($name, $options, $value, $attributes); + } + protected function textField($name, $value, $attributes) { return Form::input($name, $value, $attributes);