@param GridField $gridField
@param DataObject $record
@param string $columnName

@return string - the HTML for the column
765898
public function getColumnContent($gridField, $record, $columnName) {
		// No permission checks - handled through GridFieldDetailForm
		// which can make the form readonly if no edit permissions are available.

		$data = new ArrayData(array(
			'Link' => $record->CMSEditLink()
		));

		return $data->renderWith('GridFieldEditButton');
	}
234902
public function getColumnContent($gridField, $record, $columnName)
    {
        $cb = CheckboxField::create('bulkSelect_' . $record->ID)
            ->addExtraClass('bulkSelect no-change-track')
            ->setAttribute('data-record', $record->ID);

        return $cb->Field();
    }
493988
public function getArchiveAction($gridField, $record)
    {
        /* @var DataObject|Versioned $record */
        if (!$record->hasMethod('canArchive') || !$record->canArchive()) {
            return null;
        }

        $title = _t(__CLASS__ . '.Archive', "Archive");

        $field = GridField_FormAction::create(
            $gridField,
            'ArchiveRecord' . $record->ID,
            false,
            "archiverecord",
            ['RecordID' => $record->ID]
        )
            ->addExtraClass('action--archive btn--icon-md font-icon-box btn--no-text grid-field__icon-action action-menu--handled')
            ->setAttribute('classNames', 'action--archive font-icon-box')
            ->setDescription($title)
            ->setAttribute('aria-label', $title);

        return $field;
    }
1011508
public function convert($records): string
    {
        $doc = $this->xml_converter->convert($records);
        $doc->documentElement->setAttribute('class', $this->class_name);
        $doc->documentElement->setAttribute('id', $this->id_value);

        return $doc->saveHTML($doc->documentElement);
    }
885110
public function getFilteredRecordList($gridfield)
    {
        $list = $gridfield->getList();

        foreach ($gridfield->getComponents() as $item) {
            if ($item instanceof GridField_DataManipulator && !$item instanceof GridFieldPaginator) {
                $list = $item->getManipulatedData($gridfield, $list);
            }
        }

        return $list;
    }
349529
function display_add_field($recordid=0, $formdata=null) {
        global $DB, $OUTPUT;

        if ($formdata) {
            $fieldname = 'field_' . $this->field->id;
            $content = $formdata->$fieldname;
        } else if ($recordid) {
            $content = $DB->get_field('data_content', 'content', array('fieldid'=>$this->field->id, 'recordid'=>$recordid));
        } else {
            $content = '';
        }

        // beware get_field returns false for new, empty records MDL-18567
        if ($content===false) {
            $content='';
        }

        $str = '<div title="' . s($this->field->description) . '">';
        $str .= '<label for="field_'.$this->field->id.'"><span class="accesshide">'.$this->field->name.'</span>';
        if ($this->field->required) {
            $image = $OUTPUT->pix_icon('req', get_string('requiredelement', 'form'));
            $str .= html_writer::div($image, 'inline-req');
        }
        $str .= '</label><input class="basefieldinput form-control d-inline mod-data-input" ' .
                'type="text" name="field_' . $this->field->id . '" ' .
                'id="field_' . $this->field->id . '" value="' . s($content) . '" />';
        $str .= '</div>';

        return $str;
    }
713152
public function getHTMLFragments($gridField)
    {
        $modalID = $gridField->ID() . '_ImportModal';

        // Check for form message prior to rendering form (which clears session messages)
        $form = $this->getImportForm();
        $hasMessage = $form && $form->getMessage();

        // Render modal
        $template = SSViewer::get_templates_by_class(static::class, '_Modal');
        $viewer = new ArrayData([
            'ImportModalTitle' => $this->getModalTitle(),
            'ImportModalID' => $modalID,
            'ImportIframe' => $this->getImportIframe(),
            'ImportForm' => $this->getImportForm(),
        ]);
        $modal = $viewer->renderWith($template)->forTemplate();

        // Build action button
        $button = new GridField_FormAction(
            $gridField,
            'import',
            _t('SilverStripe\\Forms\\GridField\\GridField.CSVIMPORT', 'Import CSV'),
            'import',
            null
        );
        $button
            ->addExtraClass('btn btn-secondary font-icon-upload btn--icon-large action_import')
            ->setForm($gridField->getForm())
            ->setAttribute('data-toggle', 'modal')
            ->setAttribute('aria-controls', $modalID)
            ->setAttribute('data-target', "#{$modalID}")
            ->setAttribute('data-modal', $modal);

        // If form has a message, trigger it to automatically open
        if ($hasMessage) {
            $button->setAttribute('data-state', 'open');
        }

        return array(
            $this->targetFragment => $button->Field()
        );
    }
982840
public function renderCell(\Mmi\Orm\RecordRo $record)
    {
        $view = FrontController::getInstance()->getView();
        $view->_value = (new \Mmi\Filter\Escape)->filter($this->getValueFromRecord($record));
        $view->_truncated = (new \Mmi\Filter\Truncate)->filter($view->_value);
        return FrontController::getInstance()->getView()->renderTemplate(static::TEMPLATE_CELL);
    }
135151
public function getColumnContent($gridField, $record, $columnName)
    {
        $flagContent = '';
        $flags = $this->getStatusFlags($record);
        foreach ($flags as $class => $data) {
            $flagAttributes = [
                'class' => "ss-gridfield-badge badge status-{$class}",
            ];
            if (isset($data['title'])) {
                $flagAttributes['title'] = $data['title'];
            }
            $flagContent .= ' ' . HTML::createTag('span', $flagAttributes, Convert::raw2xml($data['text']));
        }
        return $flagContent;
    }
1020805
public function getColumnValue($record, $column)
    {
        $value = $this->getColumnValueRaw($record, $column);

        if (method_exists($this, 'eval'. studly_case($column->type) .'TypeValue')) {
            $value = $this->{'eval'. studly_case($column->type) .'TypeValue'}($record, $column, $value);
        }
        else {
            $value = $this->evalCustomListType($column->type, $record, $column, $value);
        }

        /*
         * Apply default value.
         */
        if ($value === '' || $value === null) {
            $value = $column->defaults;
        }

        /**
         * @event backend.list.overrideColumnValue
         * Overrides the column value in a list widget.
         *
         * If a value is returned from this event, it will be used as the value for the provided column.
         * `$value` is passed by reference so modifying the variable in place is also supported. Example usage:
         *
         *     Event::listen('backend.list.overrideColumnValue', function($listWidget, $record, $column, &$value) {
         *         $value .= '-modified';
         *     });
         *
         * Or
         *
         *     $listWidget->bindEvent('list.overrideColumnValue', function ($record, $column, $value) {
         *         return 'No values for you!';
         *     });
         *
         */
        if ($response = $this->fireSystemEvent('backend.list.overrideColumnValue', [$record, $column, &$value])) {
            $value = $response;
        }

        return $value;
    }
269595
private function getRecordEditingFields(DataObject $record)
    {
        $tempForm = Form::create(
            $this,
            'TempEditForm',
            $record->getCMSFields(),
            FieldList::create()
        );

        $tempForm->loadDataFrom($record);
        $fields = $tempForm->Fields();

        $fields = $this->filterRecordEditingFields($fields, $record->ID);

        return $fields;
    }
132366
protected function transformRecord($record)
    {
        $columnNames = $this->columnManager->getRequestedColumnNames();
        $columnNames->transform(function ($item) use ($record) {
            return $this->getColumnValue($item, $record);
        });

        $datatableParameters = $this->getDatatableParameters($record);

        return array_merge($datatableParameters, $columnNames->toArray());
    }
995500
public function getDataFieldValue($record, $fieldName)
    {
        if (isset($this->customDataFields[$fieldName])) {
            $callback = $this->customDataFields[$fieldName];

            return $callback($record);
        }

        if ($record->hasMethod('relField')) {
            return $record->relField($fieldName);
        }

        if ($record->hasMethod($fieldName)) {
            return $record->$fieldName();
        }

        return $record->$fieldName;
    }
1070493
public function getRowClass($record)
    {
        $value = '';

        /**
         * @event backend.list.injectRowClass
         * Provides opportunity to inject a custom CSS row class
         *
         * If a value is returned from this event, it will be used as the value for the row class.
         * `$value` is passed by reference so modifying the variable in place is also supported. Example usage:
         *
         *     Event::listen('backend.list.injectRowClass', function($listWidget, $record, &$value) {
         *         $value .= '-modified';
         *     });
         *
         * Or
         *
         *     $listWidget->bindEvent('list.injectRowClass', function ($record, $value) {
         *         return 'strike';
         *     });
         *
         */
        if ($response = $this->fireSystemEvent('backend.list.injectRowClass', [$record, &$value])) {
            $value = $response;
        }

        return $value;
    }
142338
protected function outputRows(GridField $gridField, $columns, $start, $count)
    {
        $csvWriter = $this->getCSVWriter();

        $items = $gridField->getManipulatedList();
        $items = $items->limit($count, $start);

        foreach ($items as $item) {
            if (!$item->hasMethod('canView') || $item->canView()) {
                $columnData = [];

                foreach ($columns as $columnSource => $columnHeader) {
                    if (!is_string($columnHeader) && is_callable($columnHeader)) {
                        if ($item->hasMethod($columnSource)) {
                            $relObj = $item->{$columnSource}();
                        } else {
                            $relObj = $item->relObject($columnSource);
                        }

                        $value = $columnHeader($relObj);
                    } else {
                        $value = $gridField->getDataFieldValue($item, $columnSource);

                        if ($value === null) {
                            $value = $gridField->getDataFieldValue($item, $columnHeader);
                        }
                    }

                    $columnData[] = $value;
                }

                $csvWriter->insertOne($columnData);
            }

            if ($item->hasMethod('destroy')) {
                $item->destroy();
            }
        }
    }
415693
public function getCaptionFieldLabel(RecordInterface $record, $fieldName)
    {
        if ($record) {
            /** @var \appbox $appbox */
            $appbox = $this->app['phraseanet.appbox'];
            $databox = $appbox->get_databox($record->getDataboxId());
            foreach ($databox->get_meta_structure() as $meta) {
                /** @var \databox_field $meta */
                if ($meta->get_name() === $fieldName) {
                    return $meta->get_label($this->app['locale']);
                }
            }
        }

        return '';
    }
1367465
protected function renderHeaderColumn(string $label, string $attributeName, string $dataType = "text") : string
    {
        $this->getTableAttributes();
        $inputAttr = [
            "data-parent" => $this->tableAttributes['id'], //"traktCollectionTable",
            "data-attribute" => $attributeName,
            "data-sort" => "ASC",
            "data-type" => $dataType,
            "class" => "infiniteScrollTableHeaderLink",
        ];
        
        $inputField = "";
        if ($dataType !== null) {
            $fieldAttr = [
                "size" => strlen($label),
            ];
            $inputField = H::input($attributeName, $dataType, null, $fieldAttr);
        }
        
        return H::span($label, $inputAttr).$inputField;
    }