Code Duplication    Length = 13-14 lines in 3 locations

fields/field.entry_relationship.php 1 location

@@ 1037-1050 (lines=14) @@
1034
			return Widget::Select($name, $options, array('multiple' => 'multiple'));
1035
		}
1036
1037
		private function appendSelectionSelect(&$wrapper)
1038
		{
1039
			$name = $this->createSettingsFieldName('sections', true);
1040
1041
			$input = $this->buildSectionSelect($name);
1042
			$input->setAttribute('class', 'entry_relationship-sections');
1043
1044
			$label = Widget::Label();
1045
			$label->setAttribute('class', 'column');
1046
1047
			$label->setValue(__('Available sections %s', array($input->generate())));
1048
1049
			$wrapper->appendChild($label);
1050
		}
1051
1052
		private function createEntriesHiddenInput($data)
1053
		{

fields/field.reverse_relationship.php 2 locations

@@ 402-414 (lines=13) @@
399
        return Widget::Select($name, $options);
400
    } 
401
402
    private function appendSelectionSelect(&$wrapper)
403
    {
404
        $name = $this->createSettingsFieldName('linked_section_id', false);
405
406
        $input = $this->buildSectionSelect($name);
407
        $input->setAttribute('class', 'reverse_relationship-sections');
408
409
        $label = Widget::Label();
410
411
        $label->setValue(__('Available sections %s', array($input->generate())));
412
413
        $wrapper->appendChild($label);
414
    }
415
416
    private function buildFieldSelect($name)
417
    {
@@ 434-446 (lines=13) @@
431
        return Widget::Select($name, $options);
432
    } 
433
434
    protected function appendFieldSelect(&$wrapper)
435
    {
436
        $name = $this->createSettingsFieldName('linked_field_id', false);
437
438
        $input = $this->buildFieldSelect($name);
439
        $input->setAttribute('class', 'reverse_relationship-field');
440
441
        $label = Widget::Label();
442
443
        $label->setValue(__('Available Fields %s', array($input->generate())));
444
445
        $wrapper->appendChild($label);
446
    }
447
448
    /**
449
     *