Sorry, you need to enable JavaScript to visit this website.
Skip to main content
Welcome to our website! Explore our services and portfolio.

Drupal Core APIs

Creating a Batch Service for Long-running Processes in Drupal

Submitted by admin on

Create a process (update a Node) that uses the batch API, and can be called either from a form, or from a drush command.


 

Creating a Custom (Programmatic) Block to Output HTML in Drupal

Submitted by admin on

Studying the DrupalKernel Object in Drupal

Submitted by admin on


Request object

DrupalKernel object.
createFromRequest accepts a Request object for use in intializeSettings

Settings object.
Database static method


Kernel handle() does initializeSettings(Request $request) and boot()

DrupalKernel very important service container property, which holds all Drupal services, and notably the http_kernel service, which gives us

Old fashioned ...
GLOBAL $config variable and require statement for settings.php
a $databases array passed to a Database static method.
a $settings array passed to Settings object.

Making Database Updates Using hook_update_n in Drupal

Submitted by admin on

 

drush ev 'print \Drupal::keyValue("system.schema")->get("crystalbit_entity_updates") . "\n";'
drush ev "\Drupal::keyValue('system.schema')->set('crystalbit_entity_updates', (int) 11102)";

 

Subscribe to Drupal Core APIs