function NodeRevision::defaultDisplayFiltersUser
Same name in other branches
- 8.9.x core/modules/node/src/Plugin/views/wizard/NodeRevision.php \Drupal\node\Plugin\views\wizard\NodeRevision::defaultDisplayFiltersUser()
- 10 core/modules/node/src/Plugin/views/wizard/NodeRevision.php \Drupal\node\Plugin\views\wizard\NodeRevision::defaultDisplayFiltersUser()
- 11.x core/modules/node/src/Plugin/views/wizard/NodeRevision.php \Drupal\node\Plugin\views\wizard\NodeRevision::defaultDisplayFiltersUser()
Overrides WizardPluginBase::defaultDisplayFiltersUser
File
-
core/
modules/ node/ src/ Plugin/ views/ wizard/ NodeRevision.php, line 102
Class
- NodeRevision
- Tests creating node revision views with the wizard.
Namespace
Drupal\node\Plugin\views\wizardCode
protected function defaultDisplayFiltersUser(array $form, FormStateInterface $form_state) {
$filters = [];
$type = $form_state->getValue([
'show',
'type',
]);
if ($type && $type != 'all') {
$filters['type'] = [
'id' => 'type',
'table' => 'node_field_data',
'field' => 'type',
'relationship' => 'nid',
'value' => [
$type => $type,
],
'entity_type' => 'node',
'entity_field' => 'type',
'plugin_id' => 'bundle',
];
}
return $filters;
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.