When learning new languages you always want to know the typical things like arrays, sorting, etc. Today I was messing around with some Python and noticed I had to look up how to create an array of objects.
like many I tested out GitHub co-pilot and I specifically tested it out for drupal development now would this be useful as a drupal developer will this boost my productivity, in short, yes I would definitely say so
I had this use case in my theme, where I wanted to expose a bunch of settings to my page.html.twig. Typical things would be social media links. Here is how I looped over config file values, preventing me to write a lot of lines:
So if you are building in Drupal > 8, you can have settings in the database (coming from configuration yaml files). BUT, you can also hardcode these in your settings.php file. These will always override the settings in the database.
Lately I was updating some Drupal websites and suddenly CKEditor was broken. It seems like it now needs its libraries from separate libraries folder instead of shipped with the module. Here is how I fixed it. I added the following packages to composer.json:
There are use cases on when not to use ReactiveForms. In this case, I have some ion-toggles with versions of a book. I just want to use the value of the toggle in my function and whether is set to false or true.
The following use case can occur when developing drupal: you want to patch a module, but it is a contrib module that is not in version control (it is ignored by git and gets downloaded on build). Therefore you can not use the standard GIT commands for creating a patch.