Code Duplication    Length = 13-14 lines in 3 locations

fields/field.reverse_relationship.php 2 locations

@@ 350-362 (lines=13) @@
347
        return Widget::Select($name, $options);
348
    } 
349
350
    private function appendSelectionSelect(&$wrapper)
351
    {
352
        $name = $this->createSettingsFieldName('linked_section_id', false);
353
354
        $input = $this->buildSectionSelect($name);
355
        $input->setAttribute('class', 'reverse_relationship-sections');
356
357
        $label = Widget::Label();
358
359
        $label->setValue(__('Available sections %s', array($input->generate())));
360
361
        $wrapper->appendChild($label);
362
    }
363
364
    private function buildFieldSelect($name)
365
    {
@@ 382-394 (lines=13) @@
379
        return Widget::Select($name, $options);
380
    } 
381
382
    protected function appendFieldSelect(&$wrapper)
383
    {
384
        $name = $this->createSettingsFieldName('linked_field_id', false);
385
386
        $input = $this->buildFieldSelect($name);
387
        $input->setAttribute('class', 'reverse_relationship-field');
388
389
        $label = Widget::Label();
390
391
        $label->setValue(__('Available Fields %s', array($input->generate())));
392
393
        $wrapper->appendChild($label);
394
    }
395
396
    /**
397
     * Creates the table needed for the settings of the field

fields/field.entry_relationship.php 1 location

@@ 1002-1015 (lines=14) @@
999
			return Widget::Select($name, $options, array('multiple' => 'multiple'));
1000
		}
1001
1002
		private function appendSelectionSelect(&$wrapper)
1003
		{
1004
			$name = $this->createSettingsFieldName('sections', true);
1005
1006
			$input = $this->buildSectionSelect($name);
1007
			$input->setAttribute('class', 'entry_relationship-sections');
1008
1009
			$label = Widget::Label();
1010
			$label->setAttribute('class', 'column');
1011
1012
			$label->setValue(__('Available sections %s', array($input->generate())));
1013
1014
			$wrapper->appendChild($label);
1015
		}
1016
1017
		private function createEntriesHiddenInput($data)
1018
		{