From b6d459755cb7577ad1652a52cbf69e4e3cceffee Mon Sep 17 00:00:00 2001
From: Valery Lourie <valthebald@gmail.com>
Date: Wed, 19 Feb 2025 17:55:55 +0200
Subject: [PATCH] Workflow field type category

---
 src/Plugin/Field/FieldType/WorkflowItem.php | 2 +-
 workflow.field_type_categories.yml          | 3 +++
 2 files changed, 4 insertions(+), 1 deletion(-)
 create mode 100644 workflow.field_type_categories.yml

diff --git a/src/Plugin/Field/FieldType/WorkflowItem.php b/src/Plugin/Field/FieldType/WorkflowItem.php
index f4cd03f..ff99c61 100644
--- a/src/Plugin/Field/FieldType/WorkflowItem.php
+++ b/src/Plugin/Field/FieldType/WorkflowItem.php
@@ -21,7 +21,7 @@ use Drupal\workflow\Entity\WorkflowTransitionInterface;
  *   id = "workflow",
  *   label = @Translation("Workflow state"),
  *   description = @Translation("This field stores Workflow values for a certain Workflow type from a list of allowed 'value => label' pairs, i.e. 'Publishing': 1 => unpublished, 2 => draft, 3 => published."),
- *   category = @Translation("Workflow"),
+ *   category = "workflow",
  *   default_widget = "workflow_default",
  *   default_formatter = "list_default",
  *   constraints = {
diff --git a/workflow.field_type_categories.yml b/workflow.field_type_categories.yml
new file mode 100644
index 0000000..c830f71
--- /dev/null
+++ b/workflow.field_type_categories.yml
@@ -0,0 +1,3 @@
+workflow:
+  label: 'Workflow'
+  description: 'Workflow fields'
-- 
GitLab