diff --cc core/modules/views/config/schema/views.filter.schema.yml index 4f4f77a,d5b2969..0000000 --- a/core/modules/views/config/schema/views.filter.schema.yml +++ b/core/modules/views/config/schema/views.filter.schema.yml @@@ -29,8 -31,19 +29,19 @@@ views.filter.combine label: 'Fields' sequence: - type: string - label: 'Value' + label: 'Field' + views.filter.compare: + type: views.filter + label: 'Compare' + mapping: + left_field: + type: string + label: 'Left field' + right_field: + type: string + label: 'Right field' + views.filter.date: type: views.filter.numeric label: 'Date' diff --cc core/modules/views/views.views.inc index 5b670a3,17eceee..0000000 --- a/core/modules/views/views.views.inc +++ b/core/modules/views/views.views.inc @@@ -138,21 -128,13 +138,29 @@@ function views_views_data() } } + // Registers an action bulk form per entity. + foreach (\Drupal::entityManager()->getDefinitions() as $entity_type => $entity_info) { + $actions = array_filter(\Drupal::entityManager()->getStorage('action')->loadMultiple(), function (ActionConfigEntityInterface $action) use ($entity_type) { + return $action->getType() == $entity_type; + }); + if (empty($actions)) { + continue; + } + $data[$entity_info->getBaseTable()][$entity_type . '_bulk_form'] = array( + 'title' => t('Bulk update'), + 'help' => t('Allows users to apply an action to one or more items.'), + 'field' => array( + 'id' => 'bulk_form', + ), + ); + } + $data['views']['fields_compare'] = array( + 'title' => t('Fields comparison'), - 'help' => t('Compare two fields to filter the result of a view'), ++ 'help' => t('Compare two fields to filter the result of a view.'), + 'filter' => array( + 'id' => 'compare', + ) + ); + return $data; } diff --git a/core/modules/views/lib/Drupal/views/Plugin/views/filter/Compare.php b/core/modules/views/lib/Drupal/views/Plugin/views/filter/Compare.php index 8b79e24..f9c91c6 100644 --- a/core/modules/views/lib/Drupal/views/Plugin/views/filter/Compare.php +++ b/core/modules/views/lib/Drupal/views/Plugin/views/filter/Compare.php @@ -113,7 +113,7 @@ public function adminSummary() { } /** - * {@inheritdoc} + * Add this filter to the query. * * Builds extra condition from existing fields (from existing joins). */ diff --git a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterCompareTest.php b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterCompareTest.php index b4298a2..5a2c16e 100644 --- a/core/modules/views/lib/Drupal/views/Tests/Handler/FilterCompareTest.php +++ b/core/modules/views/lib/Drupal/views/Tests/Handler/FilterCompareTest.php @@ -115,7 +115,6 @@ public function testCompare() { $view->destroy(); } - } }