How to programmatically add a custom field to Address?

How to programmatically add a custom field to Address?

I’m using Address module, and I need to add a Boolean field “Handicap access” for all addresses, whichever country is selected. I digged into module issues, I carefully read provided docs, where there is an example about how to : Create a custom... read more
How to programmatically add a custom field to Address?

How can I programmatically restrict node access?

I’m using Drupal 8 with the nodeaccess module. I’m able to set the node grants with the form. I also have a custom module which imports new nodes. These new nodes should be shown only to certain users. I know I can insert the corresponding lines into the... read more
How to get user data/authenticate with bearer token – Simple OAuth – Decoupled

How to get user data/authenticate with bearer token – Simple OAuth – Decoupled

I am working on a single page application using NUXT and Drupal 8 as headless CMS. for user authentication token I am using Simple OAuth Drupal 8 module. Everything is working fine. I am getting the access token when I send request to this API... read more
How to programmatically add a custom field to Address?

Get Webform Category Name in Preprocess

I am trying to get the Category name (from the General form settings) for webforms in a preprocess function, ultimately to add as a class to the webform wrapper. MYMODULE.module: function MYMODULE_preprocess_webform(&$variables) { kint($variables); } Right now I... read more
How to programmatically add a custom field to Address?

Programatically change exposed filter value based on another exposed filter

I have 2 exposed filters in my Drupal 8 view – both are select dropdowns. I want the value of the 2nd filter to change based on selection of first filter Here are the filters $filters = $view->display_handler->getOption(‘filters’);... read more