<?xml version="1.0" encoding="UTF-8"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>symfony</title><description/><link>https://kevinquillen.com</link><language>en</language><item><title>Upcasting Custom Route Parameters in Drupal</title><link>https://kevinquillen.com/upcasting-custom-route-parameters-drupal</link><guid isPermaLink="false">376 at https://kevinquillen.com</guid><description>
&lt;span property=&quot;schema:name&quot;&gt;Upcasting Custom Route Parameters in Drupal&lt;/span&gt;

            &lt;div property=&quot;schema:text&quot; class=&quot;text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item&quot;&gt;&lt;p&gt;Thanks to &lt;a href=&quot;https://symfony.com/&quot;&gt;Symfony&lt;/a&gt;, Drupal has an incredibly robust routing system. What once used to be a chore in Drupal versions prior to 8 is now a breeze. Creating routes is super simple and parameter upcasting is usually automatic for known entities, like nodes, users, and taxonomy terms.&lt;/p&gt;&lt;p&gt;For example, take this route definition:&lt;/p&gt;&lt;/div&gt;
      
&lt;span rel=&quot;schema:author&quot;&gt;&lt;span lang about=&quot;https://kevinquillen.com/user/1&quot; typeof=&quot;schema:Person&quot; property=&quot;schema:name&quot; datatype&gt;Kevin&lt;/span&gt;&lt;/span&gt;

&lt;span property=&quot;schema:dateCreated&quot; content=&quot;2023-11-21T00:21:35+00:00&quot;&gt;&lt;time datetime=&quot;2023-11-20T19:21:35-05:00&quot; title=&quot;Monday, November 20, 2023 - 19:21&quot;&gt;November 20th, 2023&lt;/time&gt;
&lt;/span&gt;
</description><pubDate>Tue, 21 Nov 2023 00:21:35 GMT</pubDate><dc:creator>Kevin</dc:creator></item><item><title>Routing Client Requests from Javascript to Drupal 8 to Remote Services</title><link>https://kevinquillen.com/routing-client-requests-javascript-drupal-8-remote-services</link><guid isPermaLink="false">273 at https://kevinquillen.com</guid><description>
&lt;span property=&quot;schema:name&quot;&gt;Routing Client Requests from Javascript to Drupal 8 to Remote Services&lt;/span&gt;

            &lt;div property=&quot;schema:text&quot; class=&quot;text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item&quot;&gt;&lt;p&gt;On a recent project that was built on Drupal 8, we had a requirement to integrate with three different search platforms.&lt;/p&gt;

&lt;p&gt;One of them was private access only, requiring a whitelisted IP to talk to it. On the front end, we designed and built the search form and result list logic as a ReactJS component. The component did it all, making the request and listing the results back from the response.&lt;/p&gt;&lt;/div&gt;
      
&lt;span rel=&quot;schema:author&quot;&gt;&lt;span lang about=&quot;https://kevinquillen.com/user/1&quot; typeof=&quot;schema:Person&quot; property=&quot;schema:name&quot; datatype&gt;Kevin&lt;/span&gt;&lt;/span&gt;

&lt;span property=&quot;schema:dateCreated&quot; content=&quot;2018-08-18T12:00:00+00:00&quot;&gt;&lt;time datetime=&quot;2018-08-18T08:00:00-04:00&quot; title=&quot;Saturday, August 18, 2018 - 08:00&quot;&gt;August 18th, 2018&lt;/time&gt;
&lt;/span&gt;
</description><pubDate>Sat, 18 Aug 2018 12:00:00 GMT</pubDate><dc:creator>Kevin</dc:creator></item><item><title>Overriding Services in Drupal 8 with ServiceProvideBase</title><link>https://kevinquillen.com/overriding-services-drupal-8-serviceprovidebase</link><guid isPermaLink="false">277 at https://kevinquillen.com</guid><description>
&lt;span property=&quot;schema:name&quot;&gt;Overriding Services in Drupal 8 with ServiceProvideBase&lt;/span&gt;

            &lt;div property=&quot;schema:text&quot; class=&quot;text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item&quot;&gt;&lt;p&gt;Overriding a service in Drupal 8 is pretty easy. Within your sites directory, you will see a file called &lt;code class=&quot;highlighter-rouge&quot;&gt;default.services.yml&lt;/code&gt;. You can adjust these defaults by adding a &lt;code class=&quot;highlighter-rouge&quot;&gt;services.yml&lt;/code&gt; file in the sites directory. This is common when you want to enable twig debugging when in development (as &lt;code class=&quot;highlighter-rouge&quot;&gt;development.services.yml&lt;/code&gt;).&lt;/p&gt;&lt;/div&gt;
      
&lt;span rel=&quot;schema:author&quot;&gt;&lt;span lang about=&quot;https://kevinquillen.com/user/1&quot; typeof=&quot;schema:Person&quot; property=&quot;schema:name&quot; datatype&gt;Kevin&lt;/span&gt;&lt;/span&gt;

&lt;span property=&quot;schema:dateCreated&quot; content=&quot;2017-07-10T12:00:00+00:00&quot;&gt;&lt;time datetime=&quot;2017-07-10T08:00:00-04:00&quot; title=&quot;Monday, July 10, 2017 - 08:00&quot;&gt;July 10th, 2017&lt;/time&gt;
&lt;/span&gt;
</description><pubDate>Mon, 10 Jul 2017 12:00:00 GMT</pubDate><dc:creator>Kevin</dc:creator></item><item><title>Adding Parameters to Dependency Injected Objects</title><link>https://kevinquillen.com/adding-parameters-dependency-injected-objects</link><guid isPermaLink="false">279 at https://kevinquillen.com</guid><description>
&lt;span property=&quot;schema:name&quot;&gt;Adding Parameters to Dependency Injected Objects&lt;/span&gt;

            &lt;div property=&quot;schema:text&quot; class=&quot;text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item&quot;&gt;&lt;p&gt;In the last post, I touched on how you can define a service in your &lt;code class=&quot;highlighter-rouge&quot;&gt;mymodule.services.yml&lt;/code&gt; file and pass it parameters to configure the object when it is injected as a dependency into other classes.&lt;/p&gt;

&lt;p&gt;Following on that, I ran into a scenario where I needed to define multiple Solr cores on the servers that house the dev/qa sites, and one for staging and production. Each one would also be defined in Search API as a server, and each of the sites I am indexing would have their own index under each core per environment.&lt;/p&gt;

&lt;p&gt;Why?&lt;/p&gt;&lt;/div&gt;
      
&lt;span rel=&quot;schema:author&quot;&gt;&lt;span lang about=&quot;https://kevinquillen.com/user/1&quot; typeof=&quot;schema:Person&quot; property=&quot;schema:name&quot; datatype&gt;Kevin&lt;/span&gt;&lt;/span&gt;

&lt;span property=&quot;schema:dateCreated&quot; content=&quot;2017-06-29T12:00:00+00:00&quot;&gt;&lt;time datetime=&quot;2017-06-29T08:00:00-04:00&quot; title=&quot;Thursday, June 29, 2017 - 08:00&quot;&gt;June 29th, 2017&lt;/time&gt;
&lt;/span&gt;
</description><pubDate>Thu, 29 Jun 2017 12:00:00 GMT</pubDate><dc:creator>Kevin</dc:creator></item><item><title>Dependency Inject PHP Classes into Drupal</title><link>https://kevinquillen.com/dependency-inject-php-classes-drupal</link><guid isPermaLink="false">280 at https://kevinquillen.com</guid><description>
&lt;span property=&quot;schema:name&quot;&gt;Dependency Inject PHP Classes into Drupal&lt;/span&gt;

            &lt;div property=&quot;schema:text&quot; class=&quot;text-content clearfix field field--name-body field--type-text-with-summary field--label-hidden field__item&quot;&gt;&lt;p&gt;In my latest adventures in Drupal 8, I had to build out a multisite search with Solr.&lt;/p&gt;

&lt;p&gt;While I will touch on that later, I wanted to call out something I learned today, which is how to inject dependencies to your Drupal class with non-native Drupal code.&lt;/p&gt;

&lt;p&gt;What do I mean by that?&lt;/p&gt;

&lt;p&gt;For example, while iterating over my controller for the search results page, I simply used &lt;code class=&quot;highlighter-rouge&quot;&gt;$client = new Solarium\Client();&lt;/code&gt; because I did not know how to inject that into Drupal properly.&lt;/p&gt;&lt;/div&gt;
      
&lt;span rel=&quot;schema:author&quot;&gt;&lt;span lang about=&quot;https://kevinquillen.com/user/1&quot; typeof=&quot;schema:Person&quot; property=&quot;schema:name&quot; datatype&gt;Kevin&lt;/span&gt;&lt;/span&gt;

&lt;span property=&quot;schema:dateCreated&quot; content=&quot;2017-06-20T12:00:00+00:00&quot;&gt;&lt;time datetime=&quot;2017-06-20T08:00:00-04:00&quot; title=&quot;Tuesday, June 20, 2017 - 08:00&quot;&gt;June 20th, 2017&lt;/time&gt;
&lt;/span&gt;
</description><pubDate>Tue, 20 Jun 2017 12:00:00 GMT</pubDate><dc:creator>Kevin</dc:creator></item></channel></rss>