getModule('comment')->getPath() . '/' . InstallStorage::CONFIG_INSTALL_DIRECTORY; $storage = new FileStorage($config_install_path); $entity_type_manager ->getStorage('action') ->create($storage->read('system.action.comment_delete_action')) ->save(); // Only create if the views module is enabled. if (!$module_handler->moduleExists('views')) { return; } // Save the comment admin view to config. $optional_install_path = $module_handler->getModule('comment')->getPath() . '/' . InstallStorage::CONFIG_OPTIONAL_DIRECTORY; $storage = new FileStorage($optional_install_path); $entity_type_manager ->getStorage('view') ->create($storage->read('views.view.comment')) ->save(); }