protected function setHeader($gridField, $ext)
    {
        $do = singleton($gridField->getModelClass());

        Controller::curr()->getResponse()
            ->addHeader(
                "Content-Disposition",
                'attachment; filename="' .
                $do->i18n_plural_name() .
                '.' . $ext . '"'
            );
    }
protected function setHeader($gridField, $ext)
    {
        $do = singleton($gridField->getModelClass());

        Controller::curr()->getResponse()
            ->addHeader(
                "Content-Disposition",
                'attachment; filename="' .
                $do->i18n_plural_name() .
                '.' . $ext . '"'
            );
    }
protected function setHeader ( $ gridField , $ ext ) { $ do = singleton ( $ gridField -> getModelClass ( ) ) ; Controller :: curr ( ) -> getResponse ( ) -> addHeader ( "Content-Disposition" , 'attachment; filename="' . $ do -> i18n_plural_name ( ) . '.' . $ ext . '"' ) ; }
Set the HTTP header to force a download and set the filename.
@param GridField $gridField
@param string $ext Extension to use in the filename.
Set the HTTP header to force a download and set the filename .