From 3d16375e77491792c1b71ca1b91ca7bba5d59478 Mon Sep 17 00:00:00 2001 From: Owen Bush <ojb@ukhhf.co.uk> Date: Thu, 28 Mar 2019 16:55:06 -0600 Subject: [PATCH] Computed fields cannot be sorts or filters --- recurring_events.views.inc | 24 ------------------- .../views/filter/EventInstanceDescription.php | 16 ------------- .../views/filter/EventInstanceTitle.php | 16 ------------- .../views/sort/EventInstanceDescription.php | 16 ------------- src/Plugin/views/sort/EventInstanceTitle.php | 16 ------------- 5 files changed, 88 deletions(-) delete mode 100644 src/Plugin/views/filter/EventInstanceDescription.php delete mode 100644 src/Plugin/views/filter/EventInstanceTitle.php delete mode 100644 src/Plugin/views/sort/EventInstanceDescription.php delete mode 100644 src/Plugin/views/sort/EventInstanceTitle.php diff --git a/recurring_events.views.inc b/recurring_events.views.inc index 98cfb61a..36e67143 100644 --- a/recurring_events.views.inc +++ b/recurring_events.views.inc @@ -38,18 +38,6 @@ function recurring_events_views_data_alter(array &$data) { 'id' => 'eventinstance_title', 'field_name' => 'title', ], - 'filter' => [ - 'title' => t('Event instance title'), - 'help' => t('The inherited title of an event instance.'), - 'id' => 'eventinstance_title', - 'field_name' => 'title', - ], - 'sort' => [ - 'title' => t('Event instance title'), - 'help' => t('The inherited title of an event instance.'), - 'id' => 'eventinstance_title', - 'field_name' => 'title', - ], ]; // Create a field to show the inherited description of an event instance. @@ -61,17 +49,5 @@ function recurring_events_views_data_alter(array &$data) { 'id' => 'eventinstance_description', 'field_name' => 'description', ], - 'filter' => [ - 'title' => t('Event instance description'), - 'help' => t('The inherited description of an event instance.'), - 'id' => 'eventinstance_description', - 'field_name' => 'description', - ], - 'sort' => [ - 'title' => t('Event instance description'), - 'help' => t('The inherited description of an event instance.'), - 'id' => 'eventinstance_description', - 'field_name' => 'description', - ], ]; } diff --git a/src/Plugin/views/filter/EventInstanceDescription.php b/src/Plugin/views/filter/EventInstanceDescription.php deleted file mode 100644 index 170550d2..00000000 --- a/src/Plugin/views/filter/EventInstanceDescription.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -namespace Drupal\recurring_events\Plugin\views\filter; - -use Drupal\views\Plugin\views\filter\StringFilter; - -/** - * Filter handler for the inherited event instance description. - * - * @ingroup views_filter_handlers - * - * @ViewsFilter("eventinstance_description") - */ -class EventInstanceDescription extends StringFilter { - -} diff --git a/src/Plugin/views/filter/EventInstanceTitle.php b/src/Plugin/views/filter/EventInstanceTitle.php deleted file mode 100644 index 8d090032..00000000 --- a/src/Plugin/views/filter/EventInstanceTitle.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -namespace Drupal\recurring_events\Plugin\views\filter; - -use Drupal\views\Plugin\views\filter\StringFilter; - -/** - * Filter handler for the inherited event instance title. - * - * @ingroup views_filter_handlers - * - * @ViewsFilter("eventinstance_title") - */ -class EventInstanceTitle extends StringFilter { - -} diff --git a/src/Plugin/views/sort/EventInstanceDescription.php b/src/Plugin/views/sort/EventInstanceDescription.php deleted file mode 100644 index 1504f669..00000000 --- a/src/Plugin/views/sort/EventInstanceDescription.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -namespace Drupal\recurring_events\Plugin\views\sort; - -use Drupal\views\Plugin\views\sort\Standard; - -/** - * Sort handler for the inherited event instance description. - * - * @ingroup views_filter_handlers - * - * @ViewsSort("eventinstance_description") - */ -class EventInstanceDescription extends Standard { - -} diff --git a/src/Plugin/views/sort/EventInstanceTitle.php b/src/Plugin/views/sort/EventInstanceTitle.php deleted file mode 100644 index de75e901..00000000 --- a/src/Plugin/views/sort/EventInstanceTitle.php +++ /dev/null @@ -1,16 +0,0 @@ -<?php - -namespace Drupal\recurring_events\Plugin\views\sort; - -use Drupal\views\Plugin\views\sort\Standard; - -/** - * Sort handler for the inherited event instance title. - * - * @ingroup views_filter_handlers - * - * @ViewsSort("eventinstance_title") - */ -class EventInstanceTitle extends Standard { - -} -- GitLab