diff --git a/core/modules/comment/config/install/views.view.comment.yml b/core/modules/comment/config/install/views.view.comment.yml deleted file mode 100644 index 945d07c..0000000 --- a/core/modules/comment/config/install/views.view.comment.yml +++ /dev/null @@ -1,419 +0,0 @@ -langcode: en -status: true -dependencies: - module: - - comment - - user -id: comment -label: Comments -module: comment -description: 'Find and manage comments.' -tag: '' -base_table: comment -base_field: cid -core: 8.x -display: - default: - display_plugin: default - id: default - display_title: Master - position: 1 - display_options: - access: - type: perm - options: - perm: 'administer comments' - cache: - type: none - query: - type: views_query - exposed_form: - type: basic - options: - submit_button: Apply - reset_button: false - reset_button_label: Reset - exposed_sorts_label: 'Sort by' - expose_sort_order: true - sort_asc_label: Asc - sort_desc_label: Desc - pager: - type: full - options: - items_per_page: 50 - style: - type: table - options: - grouping: { } - row_class: '' - default_row_class: true - override: true - sticky: false - caption: '' - summary: '' - description: '' - columns: - comment_bulk_form: comment_bulk_form - subject: subject - name: name - title: title - changed: changed - edit_comment: edit_comment - delete_comment: delete_comment - dropbutton: dropbutton - info: - comment_bulk_form: - align: '' - separator: '' - empty_column: false - responsive: '' - subject: - sortable: true - default_sort_order: asc - align: '' - separator: '' - empty_column: false - responsive: '' - name: - sortable: true - default_sort_order: asc - align: '' - separator: '' - empty_column: false - responsive: priority-medium - changed: - sortable: true - default_sort_order: desc - align: '' - separator: '' - empty_column: false - responsive: priority-low - edit_comment: - sortable: false - default_sort_order: asc - align: '' - separator: '' - empty_column: false - responsive: '' - delete_comment: - sortable: false - default_sort_order: asc - align: '' - separator: '' - empty_column: false - responsive: '' - dropbutton: - sortable: false - default_sort_order: asc - align: '' - separator: '' - empty_column: false - responsive: '' - default: changed - empty_table: false - row: - type: fields - fields: - comment_bulk_form: - id: comment_bulk_form - table: comment - field: comment_bulk_form - group_type: group - admin_label: '' - label: '' - exclude: false - alter: - alter_text: false - element_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - action_title: 'Update Options' - include_exclude: include - selected_actions: - - comment_delete_action - - comment_unpublish_action - plugin_id: comment_bulk_form - entity_type: comment - subject: - id: subject - table: comment_field_data - field: subject - group_type: group - admin_label: '' - label: Title - exclude: false - alter: - alter_text: false - element_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - link_to_comment: true - link_to_entity: false - entity_type: comment - entity_field: subject - plugin_id: comment - name: - id: name - table: comment_field_data - field: name - group_type: group - admin_label: '' - label: Author - exclude: false - alter: - alter_text: false - element_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - link_to_user: true - entity_type: comment - entity_field: name - plugin_id: comment_username - changed: - id: changed - table: comment_field_data - field: changed - group_type: group - admin_label: '' - label: Updated - exclude: false - alter: - alter_text: false - element_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - date_format: fallback - custom_date_format: '' - timezone: '' - entity_type: comment - entity_field: changed - plugin_id: date - edit_comment: - id: edit_comment - table: comment - field: edit_comment - group_type: group - admin_label: '' - label: '' - exclude: true - alter: - alter_text: false - element_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - text: edit - link_to_entity: false - destination: false - plugin_id: comment_link_edit - entity_type: comment - delete_comment: - id: delete_comment - table: comment - field: delete_comment - group_type: group - admin_label: '' - label: '' - exclude: true - alter: - alter_text: false - element_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - text: delete - link_to_entity: false - plugin_id: comment_link_delete - entity_type: comment - dropbutton: - id: dropbutton - table: views - field: dropbutton - group_type: group - admin_label: '' - label: Operations - exclude: false - alter: - alter_text: false - element_class: '' - element_default_classes: true - empty: '' - hide_empty: false - empty_zero: false - hide_alter_empty: true - fields: - edit_comment: edit_comment - delete_comment: delete_comment - action_bulk_form: '0' - subject: '0' - name: '0' - changed: '0' - destination: true - plugin_id: dropbutton - entity_type: comment - filters: - status: - id: status - table: comment_field_data - field: status - group_type: group - admin_label: '' - operator: '=' - value: true - group: 1 - exposed: false - expose: - operator_id: '' - label: '' - description: '' - use_operator: false - operator: '' - identifier: '' - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - entity_type: comment - entity_field: status - plugin_id: boolean - sorts: - changed: - id: changed - table: comment_field_data - field: changed - group_type: group - admin_label: '' - order: DESC - exposed: false - expose: - label: '' - granularity: second - entity_type: comment - entity_field: changed - plugin_id: date - title: Comments - header: { } - footer: { } - empty: - area_text_custom: - id: area_text_custom - table: views - field: area_text_custom - empty: true - content: 'No comments available.' - plugin_id: text_custom - arguments: { } - display_extenders: { } - field_langcode: '***LANGUAGE_language_content***' - field_langcode_add_to_query: null - page_1: - display_plugin: page - id: page_1 - display_title: 'Published Comments' - position: 1 - display_options: - path: admin/content/comment - menu: - type: tab - title: Comments - description: 'Comments published' - weight: 0 - context: '0' - menu_name: admin - display_description: '' - display_extenders: { } - field_langcode: '***LANGUAGE_language_content***' - field_langcode_add_to_query: null - page_2: - display_plugin: page - id: page_2 - display_title: 'Unapproved Comments' - position: 2 - display_options: - path: admin/content/comment/approval - menu: - type: tab - title: 'Unapproved comments' - description: 'Comments unapproved' - weight: 1 - menu_name: admin - context: '0' - display_description: '' - filters: - status: - id: status - table: comment_field_data - field: status - group_type: group - admin_label: '' - operator: '=' - value: false - group: 1 - exposed: false - expose: - operator_id: '' - label: '' - description: '' - use_operator: false - operator: '' - identifier: '' - required: false - remember: false - multiple: false - remember_roles: - authenticated: authenticated - is_grouped: false - group_info: - label: '' - description: '' - identifier: '' - optional: true - widget: select - multiple: false - remember: false - default_group: All - default_group_multiple: { } - group_items: { } - entity_type: comment - entity_field: status - plugin_id: boolean - defaults: - filters: false - filter_groups: false - fields: true - filter_groups: - operator: AND - groups: - 1: AND - display_extenders: { } - field_langcode: '***LANGUAGE_language_content***' - field_langcode_add_to_query: null diff --git a/core/modules/comment/config/optional/views.view.comment.yml b/core/modules/comment/config/optional/views.view.comment.yml new file mode 100644 index 0000000..945d07c --- /dev/null +++ b/core/modules/comment/config/optional/views.view.comment.yml @@ -0,0 +1,419 @@ +langcode: en +status: true +dependencies: + module: + - comment + - user +id: comment +label: Comments +module: comment +description: 'Find and manage comments.' +tag: '' +base_table: comment +base_field: cid +core: 8.x +display: + default: + display_plugin: default + id: default + display_title: Master + position: 1 + display_options: + access: + type: perm + options: + perm: 'administer comments' + cache: + type: none + query: + type: views_query + exposed_form: + type: basic + options: + submit_button: Apply + reset_button: false + reset_button_label: Reset + exposed_sorts_label: 'Sort by' + expose_sort_order: true + sort_asc_label: Asc + sort_desc_label: Desc + pager: + type: full + options: + items_per_page: 50 + style: + type: table + options: + grouping: { } + row_class: '' + default_row_class: true + override: true + sticky: false + caption: '' + summary: '' + description: '' + columns: + comment_bulk_form: comment_bulk_form + subject: subject + name: name + title: title + changed: changed + edit_comment: edit_comment + delete_comment: delete_comment + dropbutton: dropbutton + info: + comment_bulk_form: + align: '' + separator: '' + empty_column: false + responsive: '' + subject: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + name: + sortable: true + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: priority-medium + changed: + sortable: true + default_sort_order: desc + align: '' + separator: '' + empty_column: false + responsive: priority-low + edit_comment: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + delete_comment: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + dropbutton: + sortable: false + default_sort_order: asc + align: '' + separator: '' + empty_column: false + responsive: '' + default: changed + empty_table: false + row: + type: fields + fields: + comment_bulk_form: + id: comment_bulk_form + table: comment + field: comment_bulk_form + group_type: group + admin_label: '' + label: '' + exclude: false + alter: + alter_text: false + element_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + action_title: 'Update Options' + include_exclude: include + selected_actions: + - comment_delete_action + - comment_unpublish_action + plugin_id: comment_bulk_form + entity_type: comment + subject: + id: subject + table: comment_field_data + field: subject + group_type: group + admin_label: '' + label: Title + exclude: false + alter: + alter_text: false + element_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + link_to_comment: true + link_to_entity: false + entity_type: comment + entity_field: subject + plugin_id: comment + name: + id: name + table: comment_field_data + field: name + group_type: group + admin_label: '' + label: Author + exclude: false + alter: + alter_text: false + element_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + link_to_user: true + entity_type: comment + entity_field: name + plugin_id: comment_username + changed: + id: changed + table: comment_field_data + field: changed + group_type: group + admin_label: '' + label: Updated + exclude: false + alter: + alter_text: false + element_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + date_format: fallback + custom_date_format: '' + timezone: '' + entity_type: comment + entity_field: changed + plugin_id: date + edit_comment: + id: edit_comment + table: comment + field: edit_comment + group_type: group + admin_label: '' + label: '' + exclude: true + alter: + alter_text: false + element_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + text: edit + link_to_entity: false + destination: false + plugin_id: comment_link_edit + entity_type: comment + delete_comment: + id: delete_comment + table: comment + field: delete_comment + group_type: group + admin_label: '' + label: '' + exclude: true + alter: + alter_text: false + element_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + text: delete + link_to_entity: false + plugin_id: comment_link_delete + entity_type: comment + dropbutton: + id: dropbutton + table: views + field: dropbutton + group_type: group + admin_label: '' + label: Operations + exclude: false + alter: + alter_text: false + element_class: '' + element_default_classes: true + empty: '' + hide_empty: false + empty_zero: false + hide_alter_empty: true + fields: + edit_comment: edit_comment + delete_comment: delete_comment + action_bulk_form: '0' + subject: '0' + name: '0' + changed: '0' + destination: true + plugin_id: dropbutton + entity_type: comment + filters: + status: + id: status + table: comment_field_data + field: status + group_type: group + admin_label: '' + operator: '=' + value: true + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: comment + entity_field: status + plugin_id: boolean + sorts: + changed: + id: changed + table: comment_field_data + field: changed + group_type: group + admin_label: '' + order: DESC + exposed: false + expose: + label: '' + granularity: second + entity_type: comment + entity_field: changed + plugin_id: date + title: Comments + header: { } + footer: { } + empty: + area_text_custom: + id: area_text_custom + table: views + field: area_text_custom + empty: true + content: 'No comments available.' + plugin_id: text_custom + arguments: { } + display_extenders: { } + field_langcode: '***LANGUAGE_language_content***' + field_langcode_add_to_query: null + page_1: + display_plugin: page + id: page_1 + display_title: 'Published Comments' + position: 1 + display_options: + path: admin/content/comment + menu: + type: tab + title: Comments + description: 'Comments published' + weight: 0 + context: '0' + menu_name: admin + display_description: '' + display_extenders: { } + field_langcode: '***LANGUAGE_language_content***' + field_langcode_add_to_query: null + page_2: + display_plugin: page + id: page_2 + display_title: 'Unapproved Comments' + position: 2 + display_options: + path: admin/content/comment/approval + menu: + type: tab + title: 'Unapproved comments' + description: 'Comments unapproved' + weight: 1 + menu_name: admin + context: '0' + display_description: '' + filters: + status: + id: status + table: comment_field_data + field: status + group_type: group + admin_label: '' + operator: '=' + value: false + group: 1 + exposed: false + expose: + operator_id: '' + label: '' + description: '' + use_operator: false + operator: '' + identifier: '' + required: false + remember: false + multiple: false + remember_roles: + authenticated: authenticated + is_grouped: false + group_info: + label: '' + description: '' + identifier: '' + optional: true + widget: select + multiple: false + remember: false + default_group: All + default_group_multiple: { } + group_items: { } + entity_type: comment + entity_field: status + plugin_id: boolean + defaults: + filters: false + filter_groups: false + fields: true + filter_groups: + operator: AND + groups: + 1: AND + display_extenders: { } + field_langcode: '***LANGUAGE_language_content***' + field_langcode_add_to_query: null diff --git a/core/modules/comment/src/Form/CommentAdminOverview.php b/core/modules/comment/src/Form/CommentAdminOverview.php index 096c3fc..9b0142d 100644 --- a/core/modules/comment/src/Form/CommentAdminOverview.php +++ b/core/modules/comment/src/Form/CommentAdminOverview.php @@ -9,15 +9,15 @@ use Drupal\comment\CommentInterface; use Drupal\comment\CommentStorageInterface; -use Drupal\Core\Cache\Cache; -use Drupal\user\TempStoreFactory; use Drupal\Component\Utility\Unicode; +use Drupal\Core\Cache\Cache; use Drupal\Core\Datetime\DateFormatter; use Drupal\Core\Entity\EntityManagerInterface; use Drupal\Core\Extension\ModuleHandlerInterface; use Drupal\Core\Form\FormBase; use Drupal\Core\Form\FormStateInterface; use Drupal\Core\Url; +use Drupal\user\PrivateTempStoreFactory; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -56,7 +56,7 @@ class CommentAdminOverview extends FormBase { /** * The tempstore factory. * - * @var \Drupal\user\TempStoreFactory + * @var \Drupal\user\PrivateTempStoreFactory */ protected $tempStoreFactory; @@ -71,10 +71,10 @@ class CommentAdminOverview extends FormBase { * The date formatter service. * @param \Drupal\Core\Extension\ModuleHandlerInterface $module_handler * The module handler. - * @param \Drupal\user\TempStoreFactory $temp_store_factory + * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory * The tempstore factory. */ - public function __construct(EntityManagerInterface $entity_manager, CommentStorageInterface $comment_storage, DateFormatter $date_formatter, ModuleHandlerInterface $module_handler, TempStoreFactory $temp_store_factory) { + public function __construct(EntityManagerInterface $entity_manager, CommentStorageInterface $comment_storage, DateFormatter $date_formatter, ModuleHandlerInterface $module_handler, PrivateTempStoreFactory $temp_store_factory) { $this->entityManager = $entity_manager; $this->commentStorage = $comment_storage; $this->dateFormatter = $date_formatter; @@ -91,7 +91,7 @@ public static function create(ContainerInterface $container) { $container->get('entity.manager')->getStorage('comment'), $container->get('date.formatter'), $container->get('module_handler'), - $container->get('user.tempstore') + $container->get('user.private_tempstore') ); } diff --git a/core/modules/comment/src/Plugin/Action/DeleteComment.php b/core/modules/comment/src/Plugin/Action/DeleteComment.php index 88d05b8..29a23b9 100644 --- a/core/modules/comment/src/Plugin/Action/DeleteComment.php +++ b/core/modules/comment/src/Plugin/Action/DeleteComment.php @@ -10,7 +10,7 @@ use Drupal\Core\Action\ActionBase; use Drupal\Core\Plugin\ContainerFactoryPluginInterface; use Drupal\Core\Session\AccountInterface; -use Drupal\user\TempStoreFactory; +use Drupal\user\PrivateTempStoreFactory; use Symfony\Component\DependencyInjection\ContainerInterface; /** @@ -28,7 +28,7 @@ class DeleteComment extends ActionBase implements ContainerFactoryPluginInterfac /** * The tempstore object. * - * @var \Drupal\user\TempStore + * @var \Drupal\user\PrivateTempStore */ protected $tempStore; @@ -48,10 +48,10 @@ class DeleteComment extends ActionBase implements ContainerFactoryPluginInterfac * The plugin ID for the plugin instance. * @param array $plugin_definition * The plugin implementation definition. - * @param \Drupal\user\TempStoreFactory $temp_store_factory + * @param \Drupal\user\PrivateTempStoreFactory $temp_store_factory * The tempstore factory. */ - public function __construct(array $configuration, $plugin_id, array $plugin_definition, TempStoreFactory $temp_store_factory, AccountInterface $current_user) { + public function __construct(array $configuration, $plugin_id, array $plugin_definition, PrivateTempStoreFactory $temp_store_factory, AccountInterface $current_user) { $this->currentUser = $current_user; $this->tempStore = $temp_store_factory->get('comment_multiple_delete_confirm'); parent::__construct($configuration, $plugin_id, $plugin_definition); @@ -65,7 +65,7 @@ public static function create(ContainerInterface $container, array $configuratio $configuration, $plugin_id, $plugin_definition, - $container->get('user.tempstore'), + $container->get('user.private_tempstore'), $container->get('current_user') ); }