@inheritdoc

@param TwigData $data
@throws \Twig_Error_Loader
@throws \Twig_Error_Runtime
@throws \Twig_Error_Syntax
503769
public function render(ViewData $data): void
    {
        $modelData = $data->model()->data();
        $templatePath = $data->templatePath();

        if (!$modelData) {
            return;
        }

        $this
            ->twigLoad($templatePath)
            ->display($modelData);
    }
786162
protected function validateData($data): void
    {
        if ($data instanceof FormInterface) {
            $data = $data->getData();
        }

        if (!\is_object($data)) {
            throw new UnexpectedTypeException($data, 'object');
        }
    }
1316481
public function datatableRenderHtml(Twig_Environment $twig, AbstractDatatableView $datatable)
    {
        //return $twig->render('OlixDatatablesBootstrapBundle::datatable_html.html.twig', $this->getOptions($datatable));
        return $twig->render('SgDatatablesBundle:Datatable:datatable_html.html.twig', $this->getOptions($datatable));
    }
1353483
public function registerData(array $entityData)
    {
        foreach ($entityData as $data) {
            $this->registerEntity($this->normalizer->denormalize(
                $data,
                $this->entityCollection->getEntityClass()
            ));
        }
    }
528932
private function setData($data) {

		if(false === is_array($data)) {
   			return trigger_error(sprintf('Argument 1 passed to %s() must be of the type array, "%s" given', __METHOD__, gettype($data)), E_USER_ERROR);
   		}

		$this -> data = $data;
	}
317498
protected function prepareData(&$data)
    {
        // Remove MatchOn Filter:
        
        $name = $this->getMatchOnName();
        
        if (isset($data[$name])) {
            unset($data[$name]);
        }
    }
858336
public function render(string $template, array $data = []) : string
    {
        try {
            return $this->renderer->render($template, $data);
        } catch (Twig_Error_Loader $e) {
            throw new TemplateNotFoundException("Template '$template' not found by Twig renderer",
                null, $e);
        }
    }
1197225
protected function updateEntity($data)
    {
        if (!$data instanceof DataInterface) {
            return;
        }
        $family = $data->getFamily();

        if (!array_key_exists($data->getFamilyCode(), $this->familyMap)) {
            return;
        }
        $resource = $data->get($this->familyMap[$data->getFamilyCode()]);
        if (!$resource instanceof Document) {
            // Maybe we should reset the values to null
            return;
        }
        $data->setFileSize($resource->getFileSize());
        $this->valuesToPersist[] = $data->getValue($family->getAttribute('fileSize'));

        $data->setMimeType($resource->getMimeType());
        $this->valuesToPersist[] = $data->getValue($family->getAttribute('mimeType'));

        $data->setFileName($resource->getOriginalFileName());
        $this->valuesToPersist[] = $data->getValue($family->getAttribute('fileName'));
    }
950247
protected function render($template, $data = null)
    {
        $twigView = $this->container->view;

        // By making page data a Twig Global, we can access page data in block elements
        // which are loaded by a Twig function
        $twigEnvironment = $twigView->getEnvironment();
        $twigEnvironment->addGlobal('page', $data);
        $twigEnvironment->addGlobal('alert', $this->alert);

        return $twigView->render($this->response, $template);
    }
479919
public function render(array $data = null) : string
    {
        if (null !== $data) {
            $this->bind($data);
        }
        return $this->twig->render($this->data);
    }
153001
protected function prepareData($data)
    {
        $data->collector = $data->item['collector'];

        $data->exception = new Data($data->collector['exception']);
    }
540188
public function template($template, $data = [])
    {
        $templatePath = self::$instance->app->findTemplate($template);
        echo self::$instance->renderTemplate($templatePath, $data);
    }
964668
private function validateContentTypes(Bag $importData)
    {
        $contentTypeNames = $this->contentTypes->keys()->toArray();
        $importData->filter(function ($k, $v) use ($contentTypeNames) {
            if (!in_array($k, $contentTypeNames)) {
                throw new RuntimeException(sprintf('ContentType "%s" is not configured.', $k));
            }
        });
    }
869
private function check_fields(array $data)
    {
        $ruleset = $this->validation_rules();
        $mismatch = array_diff_key($data, $ruleset);
        $fields = array_keys($mismatch);

        foreach ($fields as $field) {
            $this->errors[] = array(
                'field' => $field,
                'value' => $data[$field],
                'rule' => 'mismatch',
                'param' => null,
            );
        }
    }
182903
public function useTwigTemplate($template, array $data = array())
	{
		$html = $this->renderer->render($template, $data);
		$this->setHtml($html);
		return $this;
	}
623205
protected function validate($data)
    {
        InvalidRegisterData::assert(
            is_subclass_of($data, \Lego\Field\Field::class),
            '$data should be subclass of ' . \Lego\Field\Field::class
        );
    }
259906
static public function fromData(string $data)
    {
        $yaml = yaml_parse($data);
        YamlException::importFromData($yaml);
        return $yaml;
    }