Given a DataObject, get an actual SS_HTTPResponse of rendered HTML
@param  DataObject $record
@return string             The rendered HTML
509185
protected function getSampleForObject(DataObject $record) {
		$response = Director::test($record->Link());

		if($response->getStatusCode() === 200) {
			return $response->getBody();
		}

		return false;
	}
318888
private function getNormalisedRecordName(Record $record): string
    {
        return '@' === $record->getName()
            ? $record->getDomain()
            : $record->getName() . '.' . $record->getDomain();
    }
1146085
public function render(\Magento\Framework\DataObject $row)
    {
        $customerId = (int)$row->getData($this->getColumn()->getIndex());
        if($customerId > 0) {
            return '<a href="' . $this->getUrl('customer/index/edit', array('id' => $customerId)) . '" target="_blank">' . $customerId . '</a>';
        }

        return nl2br(htmlspecialchars($row->getData($this->getColumn()->getIndex())));
    }
981839
protected function getDocument($record)
    {
        $document = new Document();
        $document->setData($record);
        $document->setType($this->type);
        $document->setIndex($this->index);

        return $document;
    }
775338
public function renderTableRow($record, $col)
    {
        switch (array_get($col, 'type', 'text')) {
            case 'yes_no':
                return $record->yes_no($record->{$col['db_field']});
                break;
            case 'format_default_date':
                return $record->formatDefaultData($record->{$col['db_field']});
                break;
            case 'sort':
                return '<div class="fa fa-sort sortable-handle"></div>';
                break;
            case 'relation':
                return $record->{$col['relation']}->{$col['db_field']};
                break;
            case 'translation':
                $locale = config('app.locale', 'en');
                $i18n = I18n::select('id')->where('locale', $locale)->first();
                if ($i18n) {
                    $i18nId = $i18n->id;

                    return $record->translate(1)->{$col['db_field']};
                }

                return 'No translation';
                break;
            default:
                return $record->{$col['db_field']};
                break;
        }
    }
837574
protected function getPopoverMenu($record)
    {
        // Build popover actions
        $popoverActions = $this->getPopoverActions($record);
        if ($popoverActions) {
            return PopoverField::create($popoverActions)
                ->setPlacement('top')
                ->setName('PopoverActions')
                ->setButtonTooltip(_t(
                    'SilverStripe\\AssetAdmin\\Forms\\FileFormFactory.OTHER_ACTIONS',
                    'Other actions'
                ));
        }
        return null;
    }
267460
private function translateRecordIntoEventMessage(array $record)
    {
        $identifier = new MessageIdentifier($record['event_id']);

        $payload = $this->eventSerializer->deserializePayload(
            $record['event_payload'],
            Contract::createFromClassName($record['event_payload_type'])
        );

        $metadata = $this->eventSerializer->deserializeMetadata(
            $record['event_metadata'],
            Contract::createFromClassName($record['event_metadata_type'])
        );

        $sequenceNumber = (int) $record['aggregate_version'];

        $eventMessage = new GenericEvent($this->aggregateRootIdentifier, $sequenceNumber, $identifier, $payload, $metadata);

        return $eventMessage;
    }
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;
    }
355343
public function render(\Magento\Framework\DataObject $row)
    {
        return '<div ' . (($this->_getValue($row) == '1'
            || $this->_getValue($row) == true)
            ? 'class="dotmailer-success"  '
            :
            'class="dotmailer-error"  ') . '>  </div>';
    }
1137415
protected function getIsGarbageRecord($table, $record):bool
    {
        return $this->tcaService->isHidden($table, $record) ||
                $this->isInvisibleByStartOrEndtime($table, $record) ||
                $this->hasFrontendGroupsRemoved($table, $record) ||
                ($table === 'pages' && $this->isPageExcludedFromSearch($record)) ||
                ($table === 'pages' && !$this->isIndexablePageType($record));
    }
50332
private function fixBlockFieldsForPreview($record)
    {
        foreach ($record->contenttype['fields'] as $fieldSlug => $fieldSettings) {
            if ($fieldSettings['type'] === 'block') {
                $fieldValue = $this->getBlockFieldValue($record, $fieldSlug);
                if ($fieldValue) {
                    $newArray = [];
                    foreach ($fieldValue as $item) {
                        if (!empty($item)) {
                            foreach ($item as $k => &$v) {
                                $v['block'] = $k;
                            }
                            $newArray[] = $v;
                        }
                    }
                    $this->setFieldValue($record, $fieldSlug, $newArray);
                }
            }
        }

        return $record;
    }
1373973
protected function getNamedRelation(DataObjectInterface $record)
    {
        return $record->hasMethod($this->Name) ? $record->{$this->Name}() : null;
    }
791222
public function format(array $record)
    {
        $jsonString = json_encode($this->getOutputRecord($record));

        if ($jsonString === false) {
            throw new \RuntimeException('Error happened during the log format process! (json encode error)');
        }

        return $jsonString . PHP_EOL;
    }
805743
public function getForm(GridField $grid, DataObjectInterface $record)
    {
        $fields = $this->getFields($grid, $record);

        $form = new Form($grid, null, $fields, new FieldList());
        $form->loadDataFrom($record);

        $form->setFormAction(Controller::join_links(
            $grid->Link(),
            'editable/form',
            $record->ID
        ));

        return $form;
    }
361386
public function getRecordOnClick($record)
    {
        if (!isset($this->recordOnClick)) {
            return null;
        }

        $recordOnClick = RouterHelper::replaceParameters($record, $this->recordOnClick);
        return Html::attributes(['onclick' => $recordOnClick]);
    }
606928
public function format(array $record)
    {
        $message = parent::format($record);
        list($usec, $sec) = explode(" ", microtime());
        $usec = (int)(((float)$usec)*1000000000);
        $sec = (int)$sec;
        $payload = [
            'message' => $message,
            'timestamp'=> ['seconds' => $sec,
                           'nanos' => $usec],
            'thread' => '',
            'severity' => $record['level_name'],
        ];
        if (isset($_SERVER['HTTP_X_CLOUD_TRACE_CONTEXT'])) {
            $payload['traceId'] = explode(
                "/",
                $_SERVER['HTTP_X_CLOUD_TRACE_CONTEXT']
            )[0];
        }
        return "\n" . json_encode($payload);
    }
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;
    }