Chris@0: getModule('comment')->getPath() . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY; Chris@0: $storage = new FileStorage($config_install_path); Chris@0: $entity_type_manager Chris@0: ->getStorage('action') Chris@0: ->create($storage->read('system.action.comment_delete_action')) Chris@0: ->save(); Chris@0: Chris@0: // Only create if the views module is enabled. Chris@0: if (!$module_handler->moduleExists('views')) { Chris@0: return; Chris@0: } Chris@0: Chris@0: // Save the comment admin view to config. Chris@0: $optional_install_path = $module_handler->getModule('comment')->getPath() . '/' . InstallStorage::CONFIG_OPTIONAL_DIRECTORY; Chris@0: $storage = new FileStorage($optional_install_path); Chris@0: $entity_type_manager Chris@0: ->getStorage('view') Chris@0: ->create($storage->read('views.view.comment')) Chris@0: ->save(); Chris@0: } Chris@18: Chris@18: /** Chris@18: * Add comment settings. Chris@18: */ Chris@18: function comment_post_update_add_ip_address_setting() { Chris@18: $config_factory = \Drupal::configFactory(); Chris@18: $settings = $config_factory->getEditable('comment.settings'); Chris@18: $settings->set('log_ip_addresses', TRUE) Chris@18: ->save(TRUE); Chris@18: }