commerce_add_to_cart_link.install in Commerce Add To Cart Link 8
Same filename and directory in other branches
Contains install and update functions for Commerce Add To Cart Link.
File
commerce_add_to_cart_link.installView source
<?php
/**
* @file
* Contains install and update functions for Commerce Add To Cart Link.
*/
/**
* Set initial values for the new csrf_token settings.
*/
function commerce_add_to_cart_link_update_8101() {
/** @var \Drupal\user\RoleInterface[] $roles */
$roles = \Drupal::entityTypeManager()
->getStorage('user_role')
->loadMultiple();
\Drupal::configFactory()
->getEditable('commerce_add_to_cart_link.settings')
->set('csrf_token.roles', array_keys($roles))
->save();
}
Functions
Name | Description |
---|---|
commerce_add_to_cart_link_update_8101 | Set initial values for the new csrf_token settings. |