Drupal 8

Drupal 8

To pull this off, we need to write a custom module. Let's name our module commerce_variation_sku. In our commerce_variation_sku.module file, we need implement the hook hook_entity_type_build to change the entity class and entity storage class to our custom classes. /** * Implements hook_entity_type...
Here's a simple guide on how to setup automated testing with Behat, Behat Gherkins, Selenium, Jenkins and Cucumber with Drupal 8/9. In this guide, we will be using a Drupal 8 instance with composer. Setup Behat for Drupal 8/9 First thing we need to do is to install all the composer libraries that we...
This tutorial applies to docker4drupal by wodby. PART 1: Install and configure Drupal 8 Search API Solr module Install Search API Solr module. After installing the module, configure Solr server. Go to Home > Administration > Configuration > Search and metadata > Search API Create a new server or...
This is how you can dynamically change a multi select entity field maximum number of selected items programmatically. //The sample codes below will get an entity form and render the entity form fields to a custom form. // Create the entity $entity = $this->orderItemStorage->create([ 'title' =>...
In this tutorial, I will guide you how to show Drupal's progress/throbber icon on your button that call the Views AJAX RefreshView. Views Configuration Make sure your view is using AJAX. To do that, set the "Advanced > Use Ajax" on your view. HTML Button <a href="#" class="btn btn-default reload...
Create your Event Subscriber Create your module's services yml file and declare the event subscriber services: mymodule.autologin: class: Drupal\mymodule\EventSubscriber\AutoLogin tags: - {name: event_subscriber} Save this as mymodule.services.yml inside mymodule folder Create the actual class used...