code/Forms/FileFormFactory.php
protected function getReplaceFileAction($record)
    {
        // Check if record exists and user has correct permissions
        if (!$record || !$record->isInDB() || !$record->canEdit()) {
            return null;
        }

        $action = FormAction::create('replacefile', _t(__CLASS__ . '.REPLACE_FILE', 'Replace file'))
            ->setIcon('upload');

        return $action;
    }
protected function getReplaceFileAction($record)
    {
        // Check if record exists and user has correct permissions
        if (!$record || !$record->isInDB() || !$record->canEdit()) {
            return null;
        }

        $action = FormAction::create('replacefile', _t(__CLASS__ . '.REPLACE_FILE', 'Replace file'))
            ->setIcon('upload');

        return $action;
    }
protected function getReplaceFileAction ( $ record ) { // Check if record exists and user has correct permissions if ( ! $ record || ! $ record -> isInDB ( ) || ! $ record -> canEdit ( ) ) { return null ; } $ action = FormAction :: create ( 'replacefile' , _t ( __CLASS__ . '.REPLACE_FILE' , 'Replace file' ) ) -> setIcon ( 'upload' ) ; return $ action ; }
Get Replace file action

@param File $record
@return FormAction
Get Replace file action