fix: [crud:renderInVariable] Fixed deprecation notice

develop-unstable
Sami Mokaddem 2023-02-16 15:13:52 +01:00
parent 0850c92e89
commit e4c132374e
No known key found for this signature in database
GPG Key ID: 164C473F627A06FA
1 changed files with 5 additions and 2 deletions

View File

@ -1576,8 +1576,11 @@ class CRUDComponent extends Component
private function renderViewInVariable($templateRelativeName, $data)
{
$builder = new ViewBuilder();
$builder->disableAutoLayout()->setTemplate("{$this->TableAlias}/{$templateRelativeName}");
$view = $builder->build($data);
$builder->disableAutoLayout()
->setClassName('Monad')
->setTemplate("{$this->TableAlias}/{$templateRelativeName}")
->setVars($data);
$view = $builder->build();
return $view->render();
}