Renders a display value to print to the list view.

@param Model|Taggable $model
@param mixed          $source     source column, method name or value
@return string
499118
public function render(Model $model, $source)
    {
        return implode($this->getSeparator(), array_map('e', $model->tagNames()));
    }
459196
function showView($template = null) {
		if ($this->val === null) {
			return $this->sources = '';
			} else {
			return $this->sources[$this->val()];
			}
		}
1223527
public static function createTagFromModel(Model $model)
    {
        return new Tag((string) $model->id, $model->name, $model->row());
    }
223456
public function render(Model $model, $source)
    {
        $attachment = $this->resolveModelSource($model, $source);

        if ( ! ($attachment instanceof AttachmentInterface)) {
            return null;
        }

        return $attachment->url();
    }
377040
protected function renderedFormFieldStrategies(Model $model, array $fields, array $values, array $errors = [])
    {
        $views = [];

        foreach ($fields as $key => $field) {

            try {
                $instance = $this->getFormFieldStrategyFactory()->make($field->display_strategy);

                // @codeCoverageIgnoreStart
            } catch (Exception $e) {
                $message = "Failed to make form field strategy for '{$key}': \n{$e->getMessage()}";

                throw new StrategyRenderException($message, $e->getCode(), $e);
                // @codeCoverageIgnoreEnd
            }

            try {
                $views[ $key ] = $instance->render(
                    $model,
                    $fields[ $key ],
                    old() ? old($key) : array_get($values, $key),
                    array_get($values, $key),
                    array_get($errors, $key, [])
                );

                // @codeCoverageIgnoreStart
            } catch (Exception $e) {
                $message = "Failed to render form field '{$key}' for strategy " . get_class($instance)
                         . ": \n{$e->getMessage()}";

                throw new StrategyRenderException($message, $e->getCode(), $e);
                // @codeCoverageIgnoreEnd
            }
        }

        return $views;
    }
1272153
public function process(Model $model)
    {
        $resource = $model->getData();
        $type = get_resource_type($resource);
        $typeString = 'resource (' . $type . ')';

        switch ($type) {
            case 'stream':
                $meta = stream_get_meta_data($resource);
                break;

            case 'curl':
                // No need to check for a curl installation, because we are
                // facing a curl instance right here.
                $meta = curl_getinfo($resource);
                break;

            default:
                $meta = array();
        }

        // Check, if we have something useful.
        if (empty($meta)) {
            // If we are facing a closed resource, 'Unknown' is a little bit sparse.
            // PHP 7.2 can provide more info by calling gettype().
            if (version_compare(phpversion(), '7.2.0', '>=')) {
                $typeString = gettype($resource);
            }
            return $this->pool->render->renderSingleChild(
                $model->setData($typeString)
                    ->setNormal($typeString)
                    ->setType(static::TYPE_RESOURCE)
            );
        }

        // Output meta data from the class.
        return $this->pool->render->renderExpandableChild(
            $model->setType(static::TYPE_RESOURCE)
                ->addParameter(static::PARAM_DATA, $meta)
                ->setNormal($typeString)
                ->injectCallback(
                    $this->pool->createClass('Brainworxx\\Krexx\\Analyse\\Callback\\Iterate\\ThroughResource')
                )
        );
    }
1185481
public static function renderRepeaters($model)
    {
        if (!array_get($model, 'repeaters')) {
            return null;
        }

        return optional($model->repeaters)->map(function ($repeater) {
            $repeaterType = new \ReflectionClass($repeater->type);
            $repeaterKey = str_replace('\\', '.', $repeaterType->name);
            $repeaterShortKey = $repeaterType->getShortName();
            $repeaterContent = $repeater->type;
            $repeater = $repeater;

            return view()->first([
                $repeaterType->hasMethod('getBlockViewTemplate')
                    ? $repeaterType->getMethod('getBlockViewTemplate')->invoke(null)
                    : null,
                "repeaters.{$repeaterKey}",
                "nova-repeater-blocks::{$repeaterKey}",
                'repeaters.default',
                'nova-repeater-blocks::default'
                ])->with([
                    'repeater' => $repeater,
                    'repeaterKey' => $repeaterKey,
                    'repeaterShortKey' => $repeaterShortKey,
                    'repeaterContent' => $repeaterContent,
                ])->with($repeaterContent->toArray())
                ->render();
        })->implode('');
    }
805973
protected function renderHelp(Model $model)
    {
        $data = $model->getJson();

        // Test if we have anything to display at all.
        if (empty($data) === true) {
            return '';
        }

        // We have at least something to display here.
        $helpRow = $this->getTemplateFileContent(static::FILE_HELPROW);
        $helpContent = '';

        // Add the stuff from the json after the help text, if any.
        foreach ($data as $title => $text) {
            $helpContent .= str_replace(
                array(static::MARKER_HELP_TITLE, static::MARKER_HELP_TEXT),
                array($title, $text),
                $helpRow
            );
        }

        // Add it into the wrapper.
        return str_replace(static::MARKER_HELP, $helpContent, $this->getTemplateFileContent(static::FILE_HELP));
    }
156355
public function render(Model $model, $source)
    {
        $source = $this->resolveModelSource($model, $source);

        if ( ! ($source instanceof AttachmentInterface)) {
            throw new UnexpectedValueException("Paperclip strategy expects Attachment as source");
        }

        return view(static::VIEW, [
            'exists'      => $source->size() > 0,
            'filename'    => $source->originalFilename(),
            'url'         => $source->url(),
        ]);
    }
551460
public function render(ViewModelInterface $model)
    {
        foreach ($model as $child) {
            $groupId = $child->getGroupId();
            if (empty($groupId)) {
                continue;
            }
            $result    = $this->render($child);
            $oldResult = $model->getVariable($groupId, '');
            $model->setVariable($groupId, $oldResult . $result);
        }

        $events = $this->getEvents();
        $event  = new ViewEvent($model);
        $events->trigger($event);

        return $event->getResult();
    }
48862
public function renderForm(Model $model, array $config)
    {
        $form = null;
        foreach ($config as $attribute => $options) {
            $form .= $this->renderField($model, $attribute, $options);
        }

        return $form;
    }
655712
protected function getReferenceValue(Model $model, $strategy = null, $source = null)
    {
        $strategy = $this->determineModelReferenceStrategy($model, $strategy);

        // If we have no strategy at all to fall back on, use a hard-coded reference
        if ( ! $strategy) {
            return $this->getReferenceFallback($model);
        }

        if ( ! $source) {
            $source = $this->determineModelReferenceSource($model);
        }

        return $strategy->render($model, $source);
    }
1116469
public function retrieve(Model $model, $source)
    {
        if ($this->isTranslated()) {
            return $model->translations->pluck($source, config('translatable.locale_key', 'locale'))->toArray();
        }

        return $this->resolveModelSource($model, $source);
    }
244141
public static function modelName($project, $location, $model)
    {
        return self::getModelNameTemplate()->render([
            'project' => $project,
            'location' => $location,
            'model' => $model,
        ]);
    }
631651
def render_source(self):
        """"""
        return SOURCE_TABLE_HTML % text_('\n'.join(line.render() for line in
            self.get_annotated_lines()))
344827
private function presentationModel(PresentationModel $presentationModel, string $label = ''): void
    {
        if ($label === '') {
            $label = $presentationModel->getName();
        }

        $this->group($label, false);
        $this->value($presentationModel->getName(), 'name');

        if ($presentationModel instanceof HasPresenterInterface) {
            $this->value($presentationModel->getPresenterName(), 'presenter');
        }

        $this->iterable($presentationModel->getVariables(), 'variables');
        $this->groupEnd();
    }
2726
protected function renderModel(ModelInterface $model, EnvironmentInterface $environment)
    {
        $event = new FormatModelLabelEvent($environment, $model);
        $environment->getEventDispatcher()->dispatch(
            DcGeneralEvents::FORMAT_MODEL_LABEL,
            $event
        );

        $model->setMeta($model::LABEL_VALUE, $event->getLabel());
    }