Design patterns in Drupal
SOLID principles in Drupal
How dependency injection works in Drupal?
How to create nested vertical tabs in Drupal 9 config form?
Here's how you can create nested vertical or horizontal tabs in Drupal Form API:
-
Define your configuration form using the Drupal Form API by creating a new form class that extends
ConfigFormBase
orFormBase
. -
Add a
vertical_tabs
element to your form using theDrupal\Core\Render\Element\VerticalTabs
class. This will create the top-level vertical tabs. -
Inside each top-level vertical tab, add another
vertical_tabs
element to create the nested vertical tabs.
How to increase php memory limits only for Drush commands in Drupal settings file
To increase the PHP memory limit for all PHP CLI (Command Line Interface) commands in Drupal, you can add a configuration to the settings.php
file. Here's how to do it:
-
Open the
settings.php
file for your Drupal installation. This file is usually located in thesites/default
folder of your Drupal installation. -
Add the following lines of code to the bottom of the
settings.php
file:
How to login to your Drupal site using Drush
How to add blt to ddev Drupal projects
BLT is Acquia's CLI tool that helps build and deploy Drupal applications easily. You can use it for non-Acquia hosted projects as well and it makes Drupal DevOps so much easier.
For those using VMs and docker for local setup, it can be hard to get the blt command to work without ssh-ing into the VM or docker container.