This was forked from cesarmiquel/drupal-8-cheatsheet.md and udpated to adhere to D10 standards. This is still a work in progress.
Basics:
use Drupal\file\Entity\File;
<?php | |
/** | |
* Reference: | |
* http://code.tutsplus.com/tutorials/why-you-should-be-using-phps-pdo-for-database-access--net-12059 | |
*/ | |
function connect() { | |
/** | |
* No matter what error mode you set, |
This was forked from cesarmiquel/drupal-8-cheatsheet.md and udpated to adhere to D10 standards. This is still a work in progress.
Basics:
use Drupal\file\Entity\File;
$variables['node_id'] = \Drupal::routeMatch()->getParameter('node')->Id(); |