src/Forms/GridField/GridFieldPrintButton.php
protected function getPrintColumnsForGridField(GridField $gridField)
    {
        if ($this->printColumns) {
            return $this->printColumns;
        }

        /** @var GridFieldDataColumns $dataCols */
        $dataCols = $gridField->getConfig()->getComponentByType('SilverStripe\\Forms\\GridField\\GridFieldDataColumns');
        if ($dataCols) {
            return $dataCols->getDisplayFields($gridField);
        }

        return DataObject::singleton($gridField->getModelClass())->summaryFields();
    }
protected function getPrintColumnsForGridField(GridField $gridField)
    {
        if ($this->printColumns) {
            return $this->printColumns;
        }

        /** @var GridFieldDataColumns $dataCols */
        $dataCols = $gridField->getConfig()->getComponentByType('SilverStripe\\Forms\\GridField\\GridFieldDataColumns');
        if ($dataCols) {
            return $dataCols->getDisplayFields($gridField);
        }

        return DataObject::singleton($gridField->getModelClass())->summaryFields();
    }
protected function getPrintColumnsForGridField ( GridField $ gridField ) { if ( $ this -> printColumns ) { return $ this -> printColumns ; } /** @var GridFieldDataColumns $dataCols */ $ dataCols = $ gridField -> getConfig ( ) -> getComponentByType ( 'SilverStripe\\Forms\\GridField\\GridFieldDataColumns' ) ; if ( $ dataCols ) { return $ dataCols -> getDisplayFields ( $ gridField ) ; } return DataObject :: singleton ( $ gridField -> getModelClass ( ) ) -> summaryFields ( ) ; }
Return the columns to print

@param GridField

@return array
Return the columns to print