Code Duplication    Length = 10-10 lines in 23 locations

src/form/Form.php 23 locations

@@ 128-137 (lines=10) @@
125
     *
126
     * @return string
127
     */
128
    public function textFieldRow(IFormModel $model, $property, array $options = [])
129
    {
130
        $element = $this->getField($model, $property);
131
        $options['id'] = $element['id'];
132
133
        return Html::openTag('div', $this->getBlock('block', $options)).
134
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
135
        $this->textField($model, $property, $options).
136
        Html::closeTag('div');
137
    }
138
139
    // Fields
140
@@ 194-203 (lines=10) @@
191
     *
192
     * @return string
193
     */
194
    public function fileFieldRow(IFormModel $model, $property, array $options = [])
195
    {
196
        $element = $this->getField($model, $property);
197
        $options['id'] = $element['id'];
198
199
        return Html::openTag('div', $this->getBlock('block', $options)).
200
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
201
        $this->fileField($model, $property, $options).
202
        Html::closeTag('div');
203
    }
204
205
    /**
206
     * Render file field tag
@@ 235-244 (lines=10) @@
232
     *
233
     * @return string
234
     */
235
    public function imageFieldRow(IFormModel $model, $property, array $options = [])
236
    {
237
        $element = $this->getField($model, $property);
238
        $options['id'] = $element['id'];
239
240
        return Html::openTag('div', $this->getBlock('block', $options)).
241
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
242
        $this->imageField($model, $property, $options).
243
        Html::closeTag('div');
244
    }
245
246
    /**
247
     * Render image field tag
@@ 277-286 (lines=10) @@
274
     *
275
     * @return string
276
     */
277
    public function passwordFieldRow(IFormModel $model, $property, array $options = [])
278
    {
279
        $element = $this->getField($model, $property);
280
        $options['id'] = $element['id'];
281
282
        return Html::openTag('div', $this->getBlock('block', $options)).
283
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
284
        $this->passwordField($model, $property, $options).
285
        Html::closeTag('div');
286
    }
287
288
    /**
289
     * Render password field tag
@@ 318-327 (lines=10) @@
315
     *
316
     * @return string
317
     */
318
    public function textAreaFieldRow(IFormModel $model, $property, array $options = [])
319
    {
320
        $element = $this->getField($model, $property);
321
        $options['id'] = $element['id'];
322
323
        return Html::openTag('div', $this->getBlock('block', $options)).
324
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
325
        $this->textAreaField($model, $property, $options).
326
        Html::closeTag('div');
327
    }
328
329
    /**
330
     * Render textarea tag
@@ 359-368 (lines=10) @@
356
     *
357
     * @return string
358
     */
359
    public function checkboxFieldRow(IFormModel $model, $property, array $options = [])
360
    {
361
        $element = $this->getField($model, $property);
362
        $options['id'] = $element['id'];
363
364
        return Html::openTag('div', $this->getBlock('block', $options)).
365
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
366
        $this->checkBoxField($model, $property, $options).
367
        Html::closeTag('div');
368
    }
369
370
    /**
371
     * Render check box field tag
@@ 402-411 (lines=10) @@
399
     *
400
     * @return string
401
     */
402
    public function listBoxFieldRow(IFormModel $model, $property, array $options = [])
403
    {
404
        $element = $this->getField($model, $property);
405
        $options['id'] = $element['id'];
406
407
        return Html::openTag('div', $this->getBlock('block', $options)).
408
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
409
        $this->listBoxField($model, $property, $options).
410
        Html::closeTag('div');
411
    }
412
413
    /**
414
     * Render list box tag
@@ 448-457 (lines=10) @@
445
     *
446
     * @return string
447
     */
448
    public function dropDownListFieldRow(IFormModel $model, $property, array $options = [])
449
    {
450
        $element = $this->getField($model, $property);
451
        $options['id'] = $element['id'];
452
453
        return Html::openTag('div', $this->getBlock('block', $options)).
454
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
455
        $this->dropDownListField($model, $property, $options).
456
        Html::closeTag('div');
457
    }
458
459
    /**
460
     * Render drop down list tag
@@ 493-502 (lines=10) @@
490
     *
491
     * @return string
492
     */
493
    public function checkBoxListFieldRow(IFormModel $model, $property, array $options = [])
494
    {
495
        $element = $this->getField($model, $property);
496
        $options['id'] = $element['id'];
497
498
        return Html::openTag('div', $this->getBlock('block', $options)).
499
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
500
        $this->checkBoxListField($model, $property, $options).
501
        Html::closeTag('div');
502
    }
503
504
    /**
505
     * Render check box list tag
@@ 535-544 (lines=10) @@
532
     *
533
     * @return string
534
     */
535
    public function radioButtonListFieldRow(IFormModel $model, $property, array $options = [])
536
    {
537
        $element = $this->getField($model, $property);
538
        $options['id'] = $element['id'];
539
540
        return Html::openTag('div', $this->getBlock('block', $options)).
541
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
542
        $this->radioButtonListField($model, $property, $options).
543
        Html::closeTag('div');
544
    }
545
546
    /**
547
     * Render radio button list tag
@@ 579-588 (lines=10) @@
576
     *
577
     * @return string
578
     */
579
    public function colorFieldRow(IFormModel $model, $property, array $options = [])
580
    {
581
        $element = $this->getField($model, $property);
582
        $options['id'] = $element['id'];
583
584
        return Html::openTag('div', $this->getBlock('block', $options)).
585
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
586
        $this->colorField($model, $property, $options).
587
        Html::closeTag('div');
588
    }
589
590
    /**
591
     * Render color field tag
@@ 620-629 (lines=10) @@
617
     *
618
     * @return string
619
     */
620
    public function dateFieldRow(IFormModel $model, $property, array $options = [])
621
    {
622
        $element = $this->getField($model, $property);
623
        $options['id'] = $element['id'];
624
625
        return Html::openTag('div', $this->getBlock('block', $options)).
626
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
627
        $this->dateField($model, $property, $options).
628
        Html::closeTag('div');
629
    }
630
631
    /**
632
     * Render date field tag
@@ 661-670 (lines=10) @@
658
     *
659
     * @return string
660
     */
661
    public function dateTimeFieldRow(IFormModel $model, $property, array $options = [])
662
    {
663
        $element = $this->getField($model, $property);
664
        $options['id'] = $element['id'];
665
666
        return Html::openTag('div', $this->getBlock('block', $options)).
667
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
668
        $this->dateTimeField($model, $property, $options).
669
        Html::closeTag('div');
670
    }
671
672
    /**
673
     * Render datetime field tag
@@ 702-711 (lines=10) @@
699
     *
700
     * @return string
701
     */
702
    public function dateTimeLocalFieldRow(IFormModel $model, $property, array $options = [])
703
    {
704
        $element = $this->getField($model, $property);
705
        $options['id'] = $element['id'];
706
707
        return Html::openTag('div', $this->getBlock('block', $options)).
708
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
709
        $this->dateTimeLocalField($model, $property, $options).
710
        Html::closeTag('div');
711
    }
712
713
    /**
714
     * Render datetime-local field tag
@@ 743-752 (lines=10) @@
740
     *
741
     * @return string
742
     */
743
    public function emailFieldRow(IFormModel $model, $property, array $options = [])
744
    {
745
        $element = $this->getField($model, $property);
746
        $options['id'] = $element['id'];
747
748
        return Html::openTag('div', $this->getBlock('block', $options)).
749
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
750
        $this->emailField($model, $property, $options).
751
        Html::closeTag('div');
752
    }
753
754
    /**
755
     * Render email field tag
@@ 784-793 (lines=10) @@
781
     *
782
     * @return string
783
     */
784
    public function numberFieldRow(IFormModel $model, $property, array $options = [])
785
    {
786
        $element = $this->getField($model, $property);
787
        $options['id'] = $element['id'];
788
789
        return Html::openTag('div', $this->getBlock('block', $options)).
790
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
791
        $this->numberField($model, $property, $options).
792
        Html::closeTag('div');
793
    }
794
795
    /**
796
     * Render number field tag
@@ 825-834 (lines=10) @@
822
     *
823
     * @return string
824
     */
825
    public function rangeFieldRow(IFormModel $model, $property, array $options = [])
826
    {
827
        $element = $this->getField($model, $property);
828
        $options['id'] = $element['id'];
829
830
        return Html::openTag('div', $this->getBlock('block', $options)).
831
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
832
        $this->rangeField($model, $property, $options).
833
        Html::closeTag('div');
834
    }
835
836
    /**
837
     * Render range field tag
@@ 866-875 (lines=10) @@
863
     *
864
     * @return string
865
     */
866
    public function searchFieldRow(IFormModel $model, $property, array $options = [])
867
    {
868
        $element = $this->getField($model, $property);
869
        $options['id'] = $element['id'];
870
871
        return Html::openTag('div', $this->getBlock('block', $options)).
872
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
873
        $this->searchField($model, $property, $options).
874
        Html::closeTag('div');
875
    }
876
877
    /**
878
     * Render search field tag
@@ 907-916 (lines=10) @@
904
     *
905
     * @return string
906
     */
907
    public function telFieldRow(IFormModel $model, $property, array $options = [])
908
    {
909
        $element = $this->getField($model, $property);
910
        $options['id'] = $element['id'];
911
912
        return Html::openTag('div', $this->getBlock('block', $options)).
913
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
914
        $this->telField($model, $property, $options).
915
        Html::closeTag('div');
916
    }
917
918
    /**
919
     * Render telephone tag
@@ 948-957 (lines=10) @@
945
     *
946
     * @return string
947
     */
948
    public function timeFieldRow(IFormModel $model, $property, array $options = [])
949
    {
950
        $element = $this->getField($model, $property);
951
        $options['id'] = $element['id'];
952
953
        return Html::openTag('div', $this->getBlock('block', $options)).
954
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
955
        $this->timeField($model, $property, $options).
956
        Html::closeTag('div');
957
    }
958
959
    /**
960
     * Render time field tag
@@ 989-998 (lines=10) @@
986
     *
987
     * @return string
988
     */
989
    public function urlFieldRow(IFormModel $model, $property, array $options = [])
990
    {
991
        $element = $this->getField($model, $property);
992
        $options['id'] = $element['id'];
993
994
        return Html::openTag('div', $this->getBlock('block', $options)).
995
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
996
        $this->urlField($model, $property, $options).
997
        Html::closeTag('div');
998
    }
999
1000
    /**
1001
     * Render url field tag
@@ 1030-1039 (lines=10) @@
1027
     *
1028
     * @return string
1029
     */
1030
    public function monthFieldRow(IFormModel $model, $property, array $options = [])
1031
    {
1032
        $element = $this->getField($model, $property);
1033
        $options['id'] = $element['id'];
1034
1035
        return Html::openTag('div', $this->getBlock('block', $options)).
1036
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
1037
        $this->monthField($model, $property, $options).
1038
        Html::closeTag('div');
1039
    }
1040
1041
    /**
1042
     * Render moth field tag
@@ 1071-1080 (lines=10) @@
1068
     *
1069
     * @return string
1070
     */
1071
    public function weekFieldRow(IFormModel $model, $property, array $options = [])
1072
    {
1073
        $element = $this->getField($model, $property);
1074
        $options['id'] = $element['id'];
1075
1076
        return Html::openTag('div', $this->getBlock('block', $options)).
1077
        Html::label($model->getLabel($property), $element['id'], $this->getBlock('label', $options)).
1078
        $this->weekField($model, $property, $options).
1079
        Html::closeTag('div');
1080
    }
1081
1082
    /**
1083
     * Render week field tag