src/Admin/CommentsGridFieldApproveAction.php
public function getApproveAction($gridField, $record, $columnName)
    {
        $field = GridField_FormAction::create(
            $gridField,
            'CustomAction' . $record->ID . 'Approve',
            _t(__CLASS__ . '.APPROVE', 'Approve'),
            'approve',
            ['RecordID' => $record->ID]
        )
            ->addExtraClass(implode(' ', [
                'btn',
                'btn-secondary',
                'grid-field__icon-action',
                'action-menu--handled',
                'font-icon-check-mark',
            ]))
            ->setAttribute('classNames', 'font-icon-check-mark');

        return ($record->IsSpam || !$record->Moderated) ? $field : null;
    }
public function getApproveAction($gridField, $record, $columnName)
    {
        $field = GridField_FormAction::create(
            $gridField,
            'CustomAction' . $record->ID . 'Approve',
            _t(__CLASS__ . '.APPROVE', 'Approve'),
            'approve',
            ['RecordID' => $record->ID]
        )
            ->addExtraClass(implode(' ', [
                'btn',
                'btn-secondary',
                'grid-field__icon-action',
                'action-menu--handled',
                'font-icon-check-mark',
            ]))
            ->setAttribute('classNames', 'font-icon-check-mark');

        return ($record->IsSpam || !$record->Moderated) ? $field : null;
    }
public function getApproveAction ( $ gridField , $ record , $ columnName ) { $ field = GridField_FormAction :: create ( $ gridField , 'CustomAction' . $ record -> ID . 'Approve' , _t ( __CLASS__ . '.APPROVE' , 'Approve' ) , 'approve' , [ 'RecordID' => $ record -> ID ] ) -> addExtraClass ( implode ( ' ' , [ 'btn' , 'btn-secondary' , 'grid-field__icon-action' , 'action-menu--handled' , 'font-icon-check-mark' , ] ) ) -> setAttribute ( 'classNames' , 'font-icon-check-mark' ) ; return ( $ record -> IsSpam || ! $ record -> Moderated ) ? $ field : null ; }
Returns the FormAction object, used by other methods to get properties

@return GridField_FormAction|null
Returns the FormAction object used by other methods to get properties