Code Duplication    Length = 18-18 lines in 2 locations

code/blocks/FormBlock.php 1 location

@@ 43-60 (lines=18) @@
40
    /**
41
     * @return FieldList
42
     */
43
    public function getCMSFields()
44
    {
45
        $fields = singleton(Block::class)->getCMSFields();
46
47
        if (class_exists('UserDefinedForm')) {
48
            $fields->addFieldToTab('Root.Main', DropdownField::create(
49
                'FormID',
50
                'Form',
51
                UserDefinedForm::get()->map()
52
                )->setEmptyString('')
53
                ->setDescription('select an existing User Defined Form to display')
54
            );
55
        }
56
57
        $fields->addFieldToTab('Root.Main', HTMLEditorField::create('Content'));
58
59
        return $fields;
60
    }
61
62
    /**
63
     * @return Forms|HTMLText

code/blocks/RecentBlogPostsBlock.php 1 location

@@ 52-69 (lines=18) @@
49
    /**
50
     * @return FieldList
51
     */
52
    public function getCMSFields()
53
    {
54
        $fields = singleton(Block::class)->getCMSFields();
55
56
        $fields->addFieldsToTab('Root.Main', array(
57
            NumericField::create('Limit'),
58
        ));
59
60
        if (class_exists('Blog')) {
61
            $fields->addFieldToTab(
62
                'Root.Main',
63
                DropdownField::create('BlogID', 'Featured Blog', Blog::get()->map())
64
                    ->setEmptyString('')
65
            );
66
        }
67
68
        return $fields;
69
    }
70
71
    /**
72
     * @param null $member