function commerce_bulk_update_8201 in Commerce Bulk 8
Install Commerce Bulk Attributes view and actions.
File
- ./
commerce_bulk.install, line 105 - Install and uninstall functions for the commerce_bulk module.
Code
function commerce_bulk_update_8201() {
$config = \Drupal::configFactory();
$configurations = [
'system.action.commerce_bulk_attribute_value_name',
'system.action.commerce_bulk_attribute_value_top',
'system.action.commerce_bulk_attribute_value_zdelete',
'views.view.commerce_bulk_attributes',
];
foreach ($configurations as $name) {
if ($configuration = $config
->getEditable($name)) {
$data = Yaml::decode(file_get_contents(__DIR__ . "/config/install/{$name}.yml"));
$configuration
->setData($data)
->save();
}
}
}