513 search results

Popover!

…and paste: Next, create an endpoint for this. In src/Controller/PlanetController.php, anywhere, I'll paste in a route and controller: Nothing special: it queries for the Planet and passes it to the template. In that template, adjust the variables. Instead of voyage.planet…

11:44
Creating & Mapping Layouts

…Until we actually included {% block layout %} in base.html.twig, the layout was loading... we just weren't rendering it anywhere. The takeaway is this: if you're on a page that does not map to a layout, everything is exactly the same as always…

11:31
Security Voter & Entity Permissions

…do have control over that query. Open up UserCrudController and, anywhere, I'll go near the top, override a method from the base controller called createIndexQueryBuilder(). Here's how this works: the parent method starts the query builder for us. And it already takes into…

8:36
Override all the Templates!

…of using the first method to override this - which would work - let's do something different. Copy this template and create our override template... which could live anywhere. How about in templates/admin/field/... and call it id_with_icon.html.twig. Paste the contents..…

6:47
Reliably Load External JS with Stimulus

…At this point, we can add this anchor tag anywhere on our site, and it will instantly do the work to initialize itself. Next: let's investigate the second-use case for Turbo Frames... and really the main use case: the ability to keep navigation…

9:57
URL to Public Assets

…feel like a micro improvement, but it's awesome! Thanks to this, we can call getPublicPath() from anywhere in our app to get the URL to an uploaded asset. If we move to the cloud, we only need to change the URL here! Awesome! Except..…

7:44
Embedded Images

…if it's small. When you embed, the image doesn't need to be hosted publicly anywhere because it's literally contained inside the email. Next, I already mentioned that the style tag doesn't work in gmail... which means that our email will be…

7:40
Context Builder: Dynamic Fields/Groups

…test again: This time... it passes! Context builders are awesome. Though... they do have one downside: the dynamic groups are not reflected anywhere in the documentation. Refresh the docs... then open the GET operation for a single User. The docs say that this will return…

7:47
New Component to Hold our Form

…Now that we have a proper class, we don't need to put handleFormSubmit() inside of render() anymore. Nope, we can access the props from anywhere as this.props. So, copy that function & the const, paste it in the class, turn it into a property,…

8:25
HttpKernel::handle() The Heart of Everything

…thing to take-away here is that there is a try-catch block. This means that if you throw an exception from anywhere inside your application - like a controller or a service - it’s going to get caught by this block. And when that happens…

5:46
Twig

…s added automatically to any page that has a valid HTML structure. That's why we didn't see it until we extended the layout file. Click anywhere on it to multiply the amount of information it gives you by 100! This is the profiler…

6:27
Introduction

…First, download Selenium Server, which is just a jar file that can live anywhere on your computer. Start Selenium at the command line by running java -jar followed by the filename. $ java -jar selenium-server-standalone-2.28.0.jar Now for the magic…

8:31
Form Submit Confirmation Controller

…the item is gone! But I think we can make this even more awesome. How? By making our controller configurable - like the text that it displays - so we can truly reuse it anywhere in our app. Even in this situation, saying "yes, delete it" on…

6:22
Passing Props vs Fetching Directly

…talk about that in our Vue 3 tutorial. Anyways, in this situation, because categories is boring and static, it doesn't really need to live as data anywhere. And that means, we do not need to pass it down as props. If we want to…

6:36
Page Context "Service"

…need anything to re-render when it changes. That's why it's totally legal to grab this value in sidebar.vue or anywhere else that needs it. But I want to kind of future proof our app... and plan ahead for a future where…

8:12
Product Details & Smart vs Dumb Components

…now that we're loading data via Ajax, we need a way to tell the user that things are loading... not that our server is on fire and they're waiting for nothing. Let's create a Loading component that we can re-use anywhere.

8:51
Private Variables & WeakMap

…it's not attaching any listeners or adding itself as a reference to anything in the code. In other words, this object is not attached or referenced anywhere in memory. Because of that, RepLogApp objects - and their Helper objects - should be eligible for garbage collection…

7:08
Filtering to Return only Approved Answers

…So... let's do that! In the Question class... anywhere, but right after getAnswers() makes sense, create a new function called getApprovedAnswers(). This will return a Collection, just like getAnswers(): Collection is the common interface that ArrayCollection and PersistentCollection both implement. Inside, we're going…

9:40
Input DTO Validation

…at the bottom, after executing validation, it gets back these "violations" and throws a ValidationException. This is a special exception that you can throw from anywhere to trigger the nice validation error response. So... let's go see it! At the browser, hit Execute and…

5:43
Custom Filter, getDescription() & properties

… We already know how! Back in CheeseListing, we've done this before with other filters. Anywhere in here, add @ApiFilter() with CheeseSearchFilter::class: Unfortunately, PhpStorm doesn't auto-complete that for me... so I'll copy the class name and add it on top manually…

7:09