i am working on porting views_raw_sql to D8. I got the raw field working rather easily. However, I cannot for the life of me get a sort, filter, or argument to appear in the list of available options.
My module.views.inc file contains the line
<?php $ data['views_raw_sql_8']['raw_sort'] = [ 'title' => t('Raw Argument'), 'help' => t('Provide raw SQL contextual filter.'), 'sort' => [ 'id' => 'sort_views_raw_sql_8', ], ]; ?>
inside hook_views_data()
also I have a file: root/src/Plugin/views/sort/RawSQLSort.php that is a nearly line-by-line copy of the standard sort:
<?php namespace Drupal\views_raw_sql_8\Plugin\views\sort; use Drupal\views\Plugin\views\sort\SortPluginBase; /** * Default implementation of a raw SQL sort plugin. * * @ingroup views_sort_handlers * * @ViewsSort("sort_views_raw_sql_8") */ class RawSQLSort extends SortPluginBase { } ?>
The full code is at http://cgit.drupalcode.org/sandbox-Beakerboy-2922663/tree/
Any advice on what I’m missing to get this sort to show up in the list of available options so I can begin to fill in and test the functionality? My code currently passes pareview with no warnings or errors.