Skip to content

Commit

Permalink
VACMS-14529 Move moderaton state filter to core patch.
Browse files Browse the repository at this point in the history
  • Loading branch information
swirtSJW committed Aug 24, 2023
1 parent 9cee303 commit 8c3acb7
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 123 deletions.
3 changes: 3 additions & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -354,6 +354,9 @@
"2951652 - Content lock causes redirect response preventing migration rollback.": "https://www.drupal.org/files/issues/2018-08-28/2951652-4.patch",
"3307402 - Content Lock should typehint ModuleHandler interface rather than a specific implementation": "https://www.drupal.org/files/issues/2023-02-03/3307402-typehint-module-handler-interface.patch"
},
"drupal/content_moderation": {
"3382759 - Add multiple workflow content moderation filter to Views.": "https://www.drupal.org/files/issues/2023-08-24/3382759-8.patch"
},
"drupal/core": {
"2807629 - Allow menu items which link to unpublished nodes to be selected in the parent item selector": "https://www.drupal.org/files/issues/2022-12-16/2807629-75.patch",
"2894449 - Indirect modification of overloaded element with Views responsive table": "https://www.drupal.org/files/issues/2018-10-05/core-indirect-modification-of-overloaded-element-2894449-18.patch",
Expand Down
4 changes: 2 additions & 2 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

This file was deleted.

34 changes: 0 additions & 34 deletions docroot/modules/custom/va_gov_workflow/va_gov_workflow.module
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@

use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\Core\Entity\ContentEntityTypeInterface;

/**
* Implements hook_help().
Expand Down Expand Up @@ -39,36 +38,3 @@ function _va_gov_workflow_validate_required_revision_message(array $form, FormSt
$form_state->setErrorByName('revision_log][0][value', t('Revision log message is required'));
}
}

/**
* Implements hook_entity_base_field_info_alter().
*
* {@inheritdoc}
*/
function va_gov_workflow_entity_base_field_info_alter(&$fields, ContentEntityTypeInterface $entity_type) {
// Display the revision_log_message field.
if ($entity_type->id() == 'taxonomy_term' && isset($fields['revision_log_message'])) {
// Grab the existing options so we don't stomp them without intent.
$form_options = $fields['revision_log_message']->getDisplayOptions('form');
// For some reason the field defaults to region = hidden.
$form_options['region'] = 'content';
$fields['revision_log_message']
->setRequired(TRUE)
->setDisplayOptions('form', $form_options);
}
}

/**
* Implements hook_views_data_alter().
*/
function va_gov_workflow_views_data_alter(array &$data) {
$data['node']['moderation_state_multiple_workflow_filter'] = [
'title' => t('Moderation state across workflows'),
'filter' => [
'title' => t('Moderation state'),
'help' => t('Provides a filter for nodes by their moderation state across multiple workflows.'),
'field' => 'nid',
'id' => 'moderation_state_multiple_workflow_filter',
],
];
}

0 comments on commit 8c3acb7

Please sign in to comment.