Code Duplication    Length = 8-10 lines in 2 locations

code/Forms/AssetFormFactory.php 2 locations

@@ 84-91 (lines=8) @@
81
     * @param File $record
82
     * @return FormAction
83
     */
84
    protected function getSaveAction($record)
85
    {
86
        if ($record && $record->isInDB() && $record->canEdit()) {
87
            return FormAction::create('save', _t('CMSMain.SAVE', 'Save'))
88
                ->setIcon('save');
89
        }
90
        return null;
91
    }
92
93
    /**
94
     * Get delete action, if this record is deletable
@@ 99-108 (lines=10) @@
96
     * @param File $record
97
     * @return FormAction
98
     */
99
    protected function getDeleteAction($record)
100
    {
101
        // Delete action
102
        if ($record && $record->isInDB() && $record->canDelete()) {
103
            $deleteText = _t('SilverStripe\\AssetAdmin\\Controller\\AssetAdmin.DELETE_BUTTON', 'Delete');
104
            return FormAction::create('delete', $deleteText)
105
                ->setIcon('trash-bin');
106
        }
107
        return null;
108
    }
109
110
	protected function getFormActions(Controller $controller, $name, $context = [])
111
    {