Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing way to use control constants as snippet/snippetArea name (reopen) #346

Closed
micha-walter opened this issue Sep 15, 2023 · 1 comment

Comments

@micha-walter
Copy link

I have test this, but it's not working. Same Error as above with this tests:

<div n:snippet="\Vendor\App\ExampleForm::SNIPPET_FORM">

or

{var $formName = Vendor\App\ExampleControl::class}
<div n:snippet="$formName::SNIPPET_FORM">

My packages are:

latte/latte: v3.0.9
nette/application: v3.1.13

Is there a chance that this will be supported in the future?

I used the constants in my code to redraw the controls, so the strings of n:snippet in template and $this->getComponent(\Vendor\App\ExampleForm::SNIPPET_FORM)->redrawControl() in Presenter should always the same.

Originally posted by @micha-walter in #141 (comment)

dg added a commit to nette/application that referenced this issue Oct 2, 2023
@dg dg closed this as completed Oct 2, 2023
@dg
Copy link
Member

dg commented Oct 2, 2023

The constant notation should work now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants