Create a node programmatically in Drupal 8
Here an example for create node programmatically in Drupal 8
Here an example for create node programmatically in Drupal 8
//To get the lanuage code:
$language = \Drupal::languageManager()->getCurrentLanguage()->getId();
//To get the language name:
$language = \Drupal::languageManager()->getCurrentLanguage()->getName();
Hello,
First of all, thank you for visiting my site. And sorry for my english (I try to do my best, but I'm not an English speaker).
Who Am I ?
I am just a person who are trying to learn drupal 8. As we can't found lot of codes and examples, I decide to publish all useful (even very simple and basic) examples in this site. I think this will help full for the beginners (Like me) to start develop in Drupal 8.
Hello, this site help you to create drupal 8 sites, easy ways, best practice, help tips, support ...