diff --git a/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StatusItem.php b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StatusItem.php new file mode 100644 index 0000000..054067b --- /dev/null +++ b/core/lib/Drupal/Core/Field/Plugin/Field/FieldType/StatusItem.php @@ -0,0 +1,17 @@ +valueOptions)) { + $this->valueOptions = [ + -1 => $this->t('Archived'), + 0 => $this->t('Unpublished'), + 1 => $this->t('Published'), + 2 => $this->t('Forward revision'), + ]; + } + + return $this->valueOptions; + } + +} diff --git a/core/modules/views/views.views.inc b/core/modules/views/views.views.inc index aca4b8a..24f526b 100644 --- a/core/modules/views/views.views.inc +++ b/core/modules/views/views.views.inc @@ -510,6 +510,9 @@ function views_field_default_views_data(FieldStorageConfigInterface $field_stora if ($field_storage->getType() == 'boolean') { $filter = 'boolean'; } + elseif ($field_storage->getType() == 'status') { + $filter = 'status'; + } break; case 'text': case 'blob':