What does the final keyword do in PHP?
In PHP, the `final` keyword is used to restrict the inheritance and overriding of methods and classes. Here's what it does in different contexts:
Tags
What are the types of inheritance in PHP?
In PHP, there are three types of inheritance:
Tags
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 productivity as a Drupal Developer
These are few things I picked up and still learning on my Drupal development journey that made my life easier. I love the architecture of Drupal but do find sometimes the amount of code to write, effort and learning curve a bit tedious. But these are all solvable issues. And I have solved them (more or less). Here are some tips for the same.