$data[$table]['moderation_state'
] =
[ 'title' =>
t('Moderation state'
),
'field' =>
[ 'id' => 'moderation_state_field',
'default_formatter' => 'content_moderation_state',
'field_name' => 'moderation_state',
],
'filter' =>
['id' => 'moderation_state_filter', 'allow empty' => TRUE
],
'sort' =>
['id' => 'moderation_state_sort'
],
];
$revision_table =
$entity_type->
getRevisionDataTable() ?:
$entity_type->
getRevisionTable();
$data[$revision_table]['moderation_state'
] =
[ 'title' =>
t('Moderation state'
),
'field' =>
[ 'id' => 'moderation_state_field',
'default_formatter' => 'content_moderation_state',
'field_name' => 'moderation_state',
],
'filter' =>
['id' => 'moderation_state_filter', 'allow empty' => TRUE
],
'sort' =>
['id' => 'moderation_state_sort'
],
];
}