Forget var_dump(), use this instead:
\Drupal::logger('debug')->notice('<pre>' . print_r($data, TRUE) . '</pre>');
Your logs will be clean & accessible! 😎 #DrupalDev
Want to modify variables in Twig templates? Use:
function MYTHEME_preprocess_node(&$variables) {
$variables['custom_text'] = 'Hello, Drupal!';
}
Now use {{ custom_text }} in your Twig file! 🖌️ #DrupalTheme
Never expose your settings.php. Block access with:
<Files "settings.php">
Order allow,deny
Deny from all
</Files>
A small step for big security! #Security#Drupal
Need to access a field that’s not in the display? Use this:
$node->get('field_name')->value;
Great for custom logic without altering the UI! #Drupal#PHP
Want to create a new Drupal module quickly? Just use Drush:
drush generate module-standard
No more manually creating files and folders! 🚀 #DrupalDev#Drush
Enable views caching and use cache tags for better control. Need to invalidate a cache programmatically?
\Drupal::service('cache.render')->invalidateAll();
#Drupal#Performance
Access Drupal services like logging with \Drupal::service('logger.channel.default')->notice('Log message'); to track events or errors. #Drupal#Services
2K Followers 682 FollowingKeep track of all Drupal 8 core, distribution, module and theme releases. Updates every 10 minutes. Maintained by @pietervanleuven. Ping me for improvements!
5K Followers 204 Following#DrupalConRotterdam, 28 Sept - 1 Oct 2025 is brought by @KT_Congress, the @drupalassoc & team of volunteers. @Drupal is a registered trademark of @Dries
1K Followers 168 FollowingLos Angeles Drupal User Group - leading #Drupal user group with over 1700 members. We host #DrupalCampLA to hundreds of devs each Summer since 2007.
1K Followers 199 FollowingDrupal Watchdog is the technical journal dedicated to sharing news and information within the open source Drupal community. https://t.co/1CQPfAkGMx
14K Followers 23 FollowingRepublish Drupal Security Advisories & related news. Follow Drupal Security Team. @mlh407 to get RT. DM & mentions not monitored. https://t.co/BswJZrKuK4
32K Followers 435 FollowingSince 2002, php[architect] publishes a monthly magazine & books, organizes conferences, and provides training dedicated exclusively to the world of PHP.
43K Followers 11K FollowingGrow your skills and your career with live streaming of PHP conferences, monthly meetings and workshops, 300+ videos, books, tutorials, certification, and more!