src/Reports/SiteSummary.php
public function getReportField()
    {
        Requirements::css('bringyourownideas/silverstripe-maintenance: client/dist/styles/bundle.css');
        Requirements::javascript('bringyourownideas/silverstripe-maintenance: client/dist/js/bundle.js');

        /** @var GridField $grid */
        $grid = parent::getReportField();

        /** @var GridFieldConfig $config */
        $config = $grid->getConfig();

        $grid->addExtraClass('site-summary');

        $summaryFields = Package::create()->summaryFields();
        /** @var GridFieldExportButton $exportButton */
        $exportButton = $config->getComponentByType(GridFieldExportButton::class);
        $exportButton->setExportColumns($summaryFields);
        /** @var GridFieldPrintButton $printButton */
        $printButton = $config->getComponentByType(GridFieldPrintButton::class);
        $printButton->setPrintColumns($summaryFields);

        $versionHtml = ArrayData::create([
            'Title' => _t(__CLASS__ . '.VERSION', 'Version'),
            'Version' => $this->resolveCmsVersion(),
            'LastUpdated' => $this->getLastUpdated(),
        ])->renderWith(__CLASS__ . '/VersionHeader');

        $config->addComponents(
            Injector::inst()->create(GridFieldRefreshButton::class, 'buttons-before-left'),
            Injector::inst()->create(
                GridFieldLinkButton::class,
                'https://addons.silverstripe.org',
                _t(__CLASS__ . '.LINK_TO_ADDONS', 'Explore Addons'),
                'buttons-before-left'
            ),
            $this->getDropdownFilter(),
            $this->getInfoLink(),
            Injector::inst()->create(GridFieldHtmlFragment::class, 'header', $versionHtml)
        );

        // Re-order the paginator to ensure it counts correctly, and reorder the buttons
        $paginator = $config->getComponentByType(GridFieldPaginator::class);
        $config->removeComponent($paginator)->addComponent($paginator);

        $exportButton = $config->getComponentByType(GridFieldExportButton::class);
        $config->removeComponent($exportButton)->addComponent($exportButton);

        $printButton = $config->getComponentByType(GridFieldPrintButton::class);
        $config->removeComponentsByType($printButton)->addComponent($printButton);

        return $grid;
    }
public function getReportField()
    {
        Requirements::css('bringyourownideas/silverstripe-maintenance: client/dist/styles/bundle.css');
        Requirements::javascript('bringyourownideas/silverstripe-maintenance: client/dist/js/bundle.js');

        /** @var GridField $grid */
        $grid = parent::getReportField();

        /** @var GridFieldConfig $config */
        $config = $grid->getConfig();

        $grid->addExtraClass('site-summary');

        $summaryFields = Package::create()->summaryFields();
        /** @var GridFieldExportButton $exportButton */
        $exportButton = $config->getComponentByType(GridFieldExportButton::class);
        $exportButton->setExportColumns($summaryFields);
        /** @var GridFieldPrintButton $printButton */
        $printButton = $config->getComponentByType(GridFieldPrintButton::class);
        $printButton->setPrintColumns($summaryFields);

        $versionHtml = ArrayData::create([
            'Title' => _t(__CLASS__ . '.VERSION', 'Version'),
            'Version' => $this->resolveCmsVersion(),
            'LastUpdated' => $this->getLastUpdated(),
        ])->renderWith(__CLASS__ . '/VersionHeader');

        $config->addComponents(
            Injector::inst()->create(GridFieldRefreshButton::class, 'buttons-before-left'),
            Injector::inst()->create(
                GridFieldLinkButton::class,
                'https://addons.silverstripe.org',
                _t(__CLASS__ . '.LINK_TO_ADDONS', 'Explore Addons'),
                'buttons-before-left'
            ),
            $this->getDropdownFilter(),
            $this->getInfoLink(),
            Injector::inst()->create(GridFieldHtmlFragment::class, 'header', $versionHtml)
        );

        // Re-order the paginator to ensure it counts correctly, and reorder the buttons
        $paginator = $config->getComponentByType(GridFieldPaginator::class);
        $config->removeComponent($paginator)->addComponent($paginator);

        $exportButton = $config->getComponentByType(GridFieldExportButton::class);
        $config->removeComponent($exportButton)->addComponent($exportButton);

        $printButton = $config->getComponentByType(GridFieldPrintButton::class);
        $config->removeComponentsByType($printButton)->addComponent($printButton);

        return $grid;
    }
public function getReportField ( ) { Requirements :: css ( 'bringyourownideas/silverstripe-maintenance: client/dist/styles/bundle.css' ) ; Requirements :: javascript ( 'bringyourownideas/silverstripe-maintenance: client/dist/js/bundle.js' ) ; /** @var GridField $grid */ $ grid = parent :: getReportField ( ) ; /** @var GridFieldConfig $config */ $ config = $ grid -> getConfig ( ) ; $ grid -> addExtraClass ( 'site-summary' ) ; $ summaryFields = Package :: create ( ) -> summaryFields ( ) ; /** @var GridFieldExportButton $exportButton */ $ exportButton = $ config -> getComponentByType ( GridFieldExportButton :: class ) ; $ exportButton -> setExportColumns ( $ summaryFields ) ; /** @var GridFieldPrintButton $printButton */ $ printButton = $ config -> getComponentByType ( GridFieldPrintButton :: class ) ; $ printButton -> setPrintColumns ( $ summaryFields ) ; $ versionHtml = ArrayData :: create ( [ 'Title' => _t ( __CLASS__ . '.VERSION' , 'Version' ) , 'Version' => $ this -> resolveCmsVersion ( ) , 'LastUpdated' => $ this -> getLastUpdated ( ) , ] ) -> renderWith ( __CLASS__ . '/VersionHeader' ) ; $ config -> addComponents ( Injector :: inst ( ) -> create ( GridFieldRefreshButton :: class , 'buttons-before-left' ) , Injector :: inst ( ) -> create ( GridFieldLinkButton :: class , 'https://addons.silverstripe.org' , _t ( __CLASS__ . '.LINK_TO_ADDONS' , 'Explore Addons' ) , 'buttons-before-left' ) , $ this -> getDropdownFilter ( ) , $ this -> getInfoLink ( ) , Injector :: inst ( ) -> create ( GridFieldHtmlFragment :: class , 'header' , $ versionHtml ) ) ; // Re-order the paginator to ensure it counts correctly, and reorder the buttons $ paginator = $ config -> getComponentByType ( GridFieldPaginator :: class ) ; $ config -> removeComponent ( $ paginator ) -> addComponent ( $ paginator ) ; $ exportButton = $ config -> getComponentByType ( GridFieldExportButton :: class ) ; $ config -> removeComponent ( $ exportButton ) -> addComponent ( $ exportButton ) ; $ printButton = $ config -> getComponentByType ( GridFieldPrintButton :: class ) ; $ config -> removeComponentsByType ( $ printButton ) -> addComponent ( $ printButton ) ; return $ grid ; }
Add a button row, including link out to the SilverStripe addons repository, and export button

{@inheritdoc}
Add a button row including link out to the SilverStripe addons repository and export button