Renders the view model.

@param \Es\Mvc\ViewModelInterface $model The view model

@return mixed The result of rendering
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();
    }
994367
public function create(ModelInterface $model)
    {
        $posttype = $this->container->make(PosttypeSingularity::class);

        $posttype
            ->setModel($model)
            ->boot();

        return $posttype;
    }
372380
public function render(ElementInterface $element): string
    {
        $field = $this->factory->create($element->type())
            ->render($element);

        $errors = $element instanceof ErrorAwareInterface
            ? $this->factory->create(Errors::class)
                ->render($element)
            : '';

        $description = $element instanceof DescriptionAwareInterface
            ? $this->factory->create(Description::class)
                ->render($element)
            : '';

        $label = $element instanceof LabelAwareInterface
            ? $this->factory->create(Label::class)
                ->render($element)
            : '';

        $html = ($label !== '')
            ? sprintf(
                '<th>%1$s</th><td>%2$s %3$s %4$s</td>',
                $label,
                $field,
                $description,
                $errors
            )
            : sprintf(
                '<td colspan="2">%1$s %2$s %3$s</td>',
                $field,
                $description,
                $errors
            );

        $rowAttributes = [
            'class' => 'form-row'.($errors === ''
                    ? ''
                    : ' form-row--has-errors'),
        ];

        return '<tr '.$this->attributesToString($rowAttributes).'>'.$html.'</tr>';
    }
1116399
public function visitEmail(EmailInterface $email)
    {
        $template = "email/{$email->getType()}.twig";

        return $this
            ->loadTemplate($template)
            ->render(
                [
                    "id" => $email->getId(),
                    "classes" => $email->getClasses(),
                    "data" => $email->getData(),
                    "message" => $email->getMessage(),
                ]
            );
    }
1283117
private function renderPage(PageInterface $page)
    {
        if ($this->pageRenderer && $this->pageRenderer->supports($page)) {
            return $this
                ->pageRenderer
                ->render($page);
        }

        return $page->getContent();
    }
39499
protected function renderElement(ElementInterface $element)
    {
        $collection = $this->getAttributesCollection($element);

        $this->addElementChildren($element, $collection);
        $this->addElementDependencies($element, $collection);
        $this->addElementRules($element, $collection);

        return $this->formatter->formatAttributesCollection($collection);
    }
1259002
public function render($template, PageInterface $page = null)
    {
        if (!$template) {
            return null;
        }

        $twigTemplate = $this->twig->createTemplate($template);

        return $twigTemplate->render([
            'node' => $page,
        ]);
    }
104707
public function renderNodeControll($model)
    {
        $disabled = false;
        if ($this->isAllowNodeSelectCallback && is_callable($this->isAllowNodeSelectCallback)) {
            $function = $this->isAllowNodeSelectCallback;
            if (!$function($model)) {
                $disabled = "disabled";
            }
        }

        if ($this->multiple) {
            $controllElement = Html::checkbox($this->id . '-checkbox', false, [
                'value' => $model->id,
                'class' => 'sx-checkbox',
                'disabled' => $disabled,
                'style' => 'float: left; margin-left: 5px; margin-right: 5px;',
            ]);
        } else {
            $controllElement = Html::radio($this->id . '-radio', false, [
                'value' => $model->id,
                'class' => 'sx-radio',
                'disabled' => $disabled,
                'style' => 'float: left; margin-left: 5px; margin-right: 5px;',
            ]);
        }

        return $controllElement;
    }
690534
public function process(Model $model)
    {
        // Unknown type, better encode it, just to be sure.
        $type = $this->pool->encodingService->encodeString(gettype($model->getData()));
        return $this->pool->render->renderSingleChild(
            $model->setType($type)
                ->setNormal('Unhandled type: ' . $type)
                ->setHelpid('unhandedOtherHelp')
        );
    }
1370559
protected function render ()
  {
    if ($this->view) {
      // The view model is sent to render() because the view may not be a Matisse template, in which case the model must
      // be set explicitly.
      echo $this->view->render ($this->getViewModel ());
    }
    elseif ($this->shadowDOM)
      $this->shadowDOM->run ();
    // Otherwise, do NOT render the component's content
  }
184073
public function render(Model $model, $source)
    {
        $source = $this->resolveModelSource($model, $source);

        return '#' . $model->getKey() . ': ' . $source;
    }
509567
public function render()
    {
        $parser = new ClassParser($this->reflectionClass);
        $methods = $parser->getMethodsDetails();
        ksort($methods);

        $this->setData(
            [
                'className' => $this->reflectionClass->getName(),
                'classShortName' => $this->reflectionClass->getShortName(),
                'methods' => $methods,
                'classDescription' => $parser->getClassDescription(),
                'interfaces' => $parser->getInterfaces(),
                'parentClass' => $parser->getParentClassName(),
                'inheritedMethods' => $parser->getInheritedMethods(),
            ]
        );
        return parent::render();
    }
568113
public function renderNodeControll($model)
    {
        if ($this->_getMode() == SelectTree::MOD_MULTI) {
            $controllElement = Html::checkbox('tree_id', false, [
                'value' => $model->id,
                'class' => 'sx-checkbox',
                'style' => 'float: left; margin-left: 5px; margin-right: 5px;',
                'onclick' => new JsExpression(<<<JS
    sx.Tree.select("{$model->id}");
JS
                )
            ]);


        } else {
            if ($this->_getMode() == SelectTree::MOD_SINGLE) {

                $controllElement = Html::radio('tree_id', false, [
                    'value' => $model->id,
                    'class' => 'sx-readio',
                    'style' => 'float: left; margin-left: 5px; margin-right: 5px;',
                    'onclick' => new JsExpression(<<<JS
    sx.Tree.selectSingle("{$model->id}");
JS
                    )
                ]);

            } else {
                if ($this->_getMode() == SelectTree::MOD_COMBO) {

                    $controllElement = Html::radio('tree_id', false, [
                        'value' => $model->id,
                        'class' => 'sx-readio',
                        'style' => 'float: left; margin-left: 5px; margin-right: 5px;',
                        'onclick' => new JsExpression(<<<JS
                    sx.Tree.selectSingle("{$model->id}");
JS
                        )
                    ]);

                    $controllElement .= Html::checkbox('tree_id', false, [
                        'value' => $model->id,
                        'class' => 'sx-checkbox',
                        'style' => 'float: left; margin-left: 5px; margin-right: 5px;',
                        'onclick' => new JsExpression(<<<JS
    sx.Tree.select("{$model->id}");
JS
                        )
                    ]);

                } else {
                    $controllElement = '';
                }
            }
        }

        return $controllElement;
    }
1248954
public function process(Model $model)
    {
        $object = $model->getData();
        // Output data from the class.
        return $this->pool->render->renderExpandableChild(
            $model->setType(static::TYPE_CLASS)
                ->addParameter(static::PARAM_DATA, $object)
                ->addParameter(static::PARAM_NAME, $model->getName())
                ->setNormal('\\' . get_class($object))
                ->setDomid($this->generateDomIdFromObject($object))
                ->injectCallback(
                    $this->pool->createClass('Brainworxx\\Krexx\\Analyse\\Callback\\Analyse\\Objects')
                )
        );
    }
732785
public function bind(ViewModelInterface $model)
	{
		$this->scoped['@file'] = $model->getResource();
		$this->scoped['@model'] = $this->model = $model;
		$this->scoped['@context'] = $this;
		
		$this->renderer->triggerContextBound($this);
	}
1193229
public function setModel(Model $model)
    {
        $this->model = $model;
        $append = $this->getAppends();

        if ($append instanceof WithModelInterface) {
            $append->setModel($model);
        }

        return $this;
    }
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('');
    }