protected function getRecordGridfieldRow($record)
    {
        $this->gridField->setList(new ArrayList(array($record)));
        $rowContent = '';

        foreach ($this->gridField->getColumns() as $column) {
            $colContent = $this->gridField->getColumnContent($record, $column);
            // Null means this columns should be skipped altogether.
            if ($colContent === null) {
                continue;
            }

            $colAttributes = $this->gridField->getColumnAttributes($record, $column);
            $rowContent .= HTML::createTag(
                'td',
                $colAttributes,
                $colContent
            );
        }

        $rowAttributes = array(
            'class' => 'ss-gridfield-item ' . implode(' ', $this->successClasses),
            'data-id' => $record->ID,
            'data-class' => $record->ClassName,
        );
        $row = HTML::createTag(
            'tr',
            $rowAttributes,
            $rowContent
        );
        return $row;
    }
protected function getRecordGridfieldRow($record)
    {
        $this->gridField->setList(new ArrayList(array($record)));
        $rowContent = '';

        foreach ($this->gridField->getColumns() as $column) {
            $colContent = $this->gridField->getColumnContent($record, $column);
            // Null means this columns should be skipped altogether.
            if ($colContent === null) {
                continue;
            }

            $colAttributes = $this->gridField->getColumnAttributes($record, $column);
            $rowContent .= HTML::createTag(
                'td',
                $colAttributes,
                $colContent
            );
        }

        $rowAttributes = array(
            'class' => 'ss-gridfield-item ' . implode(' ', $this->successClasses),
            'data-id' => $record->ID,
            'data-class' => $record->ClassName,
        );
        $row = HTML::createTag(
            'tr',
            $rowAttributes,
            $rowContent
        );
        return $row;
    }
protected function getRecordGridfieldRow ( $ record ) { $ this -> gridField -> setList ( new ArrayList ( array ( $ record ) ) ) ; $ rowContent = '' ; foreach ( $ this -> gridField -> getColumns ( ) as $ column ) { $ colContent = $ this -> gridField -> getColumnContent ( $ record , $ column ) ; // Null means this columns should be skipped altogether. if ( $ colContent === null ) { continue ; } $ colAttributes = $ this -> gridField -> getColumnAttributes ( $ record , $ column ) ; $ rowContent .= HTML :: createTag ( 'td' , $ colAttributes , $ colContent ) ; } $ rowAttributes = array ( 'class' => 'ss-gridfield-item ' . implode ( ' ' , $ this -> successClasses ) , 'data-id' => $ record -> ID , 'data-class' => $ record -> ClassName , ) ; $ row = HTML :: createTag ( 'tr' , $ rowAttributes , $ rowContent ) ; return $ row ; }
Creates a gridfield table row for a given record
@param  DataObject $record the record to create the row for
@return string         the html TR tag
Creates a gridfield table row for a given record