Skip to main content
Home
Toggle menu

Main navigation

  • Home
  • Blogs

Blog

Drupal 8 vhost configuration for NGINX - Part 2

In previous part of nginx vhost configuration, we've configured nginx to serve Drupal site directly (i.e.
  • Read more about Drupal 8 vhost configuration for NGINX - Part 2

Drupal 8 vhost configuration for NGINX - Part 1

Drupal support majority of web-servers available in the market.
  • Read more about Drupal 8 vhost configuration for NGINX - Part 1

Check if service exists in Drupal 8

In Drupal 8, a service is any object managed by th
  • Read more about Check if service exists in Drupal 8

Check if Module is installed - Drupal 8

Using below example we can check if module is installed or not :
  • Read more about Check if Module is installed - Drupal 8

Programmatically delete configuration - Drupal 8

By default Drupal stores all configuration into database. Below example shows how to remove / delete configuration object of 'automated_cron.settings', i.e. remove cron settings.
  • Read more about Programmatically delete configuration - Drupal 8

Programmatically install / uninstall module - Drupal 8

Modules are used to extend and customize Drupal Core. To install module normally we can navigate to "Admin => Extend" link in toolbar. Like older versions of Drupal, Drupal 8 doesn't allow modules to be enable / disable.
  • Read more about Programmatically install / uninstall module - Drupal 8

Programmatically open chosen drop-down

Chosen is one of best jQuery library available to design HTML drop-down. Here's how we can auto open chosen drop-down using small code snippet in jQuery. Below example uses the country drop-down.
  • Read more about Programmatically open chosen drop-down

Programmatically put site in maintenance mode - Drupal 8

In Drupal 8, the Site Maintenance status is stored in State API. To put Site in Maintenance mode or to get Site out of Maintenance mode, we can use following code snippet:
  • Read more about Programmatically put site in maintenance mode - Drupal 8

Get or Set module weight - Drupal 8

In Drupal 8, module's weight is stored into ConfigFactory. Here's how to get or set module weight. Get module weight:
<?php
  $extension_config = \Drupal::configFactory()->getEditable('core.extension');
  • Read more about Get or Set module weight - Drupal 8

Bootstrap Drupal 7 on Multisite

As a developer we always been into position where we need to write a custom script which bootstrap's Drupal Core from code and do some operations. This is pretty straight forward when working single site.
  • Read more about Bootstrap Drupal 7 on Multisite

Pagination

  • Current page 1
  • Page 2
  • Page 3
  • Page 4
  • Page 5
  • Page 6
  • Next page Next
  • Last page Last
Subscribe to Blog

Monthly archive

  • March 2019 3
  • September 2018 1
  • July 2018 2
  • April 2018 1
  • August 2017 1

Pagination

  • Next page ››
sfy39587stp18