-
Hello.
Thank you in advance! |
Beta Was this translation helpful? Give feedback.
Answered by
dg
Jul 5, 2021
Replies: 1 comment
-
https://fiddle.nette.org/nette/#6c8292c389 $closure = new Nette\PhpGenerator\Closure;
$closure->setBody('return $model->getBrand()->one()->name;');
$closure->addParameter('model')->setType(BrandAliasAssignment::class);
echo (new Nette\PhpGenerator\Dumper)->dump([
'attribute' => 'brand_id',
'filter' => new Nette\PhpGenerator\PhpLiteral('$searchModel->brandList()'),
'value' => new Nette\PhpGenerator\PhpLiteral((string) $closure),
]); |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
svfolder
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://fiddle.nette.org/nette/#6c8292c389