In our example below, we will be adding translation to a node entity and therefore use the node namespace.
How to create a node programatically in Drupal 8
Here’s how to create a node in the code directly with various field types. First make use of the node namespace. Simple title and body node creation : note if you don’t specify the language code, default site language will be used and same applies for the body format. Now let’s have a look for Continue Reading
How to render a menu in symfony’s twig template in Drupal 8
Instead of creating blocks for each and every menu you want, it ould be easier to directly print your custom menus in a twig template of single block as if it was a variable made available to the twig. Twig is a modern template engine for PHP Fast: Twig compiles templates down to plain optimized PHP code. Continue Reading