04.
Lista de botones con AutowireIterator
Keep on Learning!
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
If you liked what you've learned so far, dive in! Subscribe to get access to this tutorial plus video, code and script downloads.
Whoops, an error! Please, try again later.
4 Comments
Hi:
In this chapter, after modifying all files according to the instructions, the system does not work and throws the following error when you press a button:
What is missing?
Hey @giorgiocba ,
Yes, this is OK in this chapter, actually if you watch the video till the end - you will see that the author got the exact same error :) And how to fix it? That will be explained in the next chapter ;) See https://symfonycasts.com/screencast/dependency-injection-attributes/locator-and-iterator
Cheers!
I was a little bit confused by this lesson.
The code in the video differs a bit from the codeblocks on the page.
Using
[]vs.yield.And:
This also made dumping
$remote->buttons()differ.Versus:
In the end, the template renders exactly the same though.
Hey @Coding010!
Thanks for catching this, I've updated the code block logic to match the video.
One thing to note is the return type: in the video it's
arraybut in the script, I've left asiterable. As you've noted the end result is the same andarrayis a type ofiterable.Thanks again!
Kevin
"Houston: no signs of life"
Start the conversation!