We have this interface, but it's empty at the moment. I think this is a good idea to implement, as stuff like efq will want to implement their own query class, and an interface will help with that.

postponing on #1941612: Tidy up view query plugin methods as that changes the method names.

There is nothing stopping the discussion of what methods should atleast be contained in this interface though.

CommentFileSizeAuthor
#7 vdc-1941672-7.patch1.16 KBdawehner
#2 1941672-2.patch11.08 KBpwolanin
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

pwolanin’s picture

Status: Postponed » Active

Seems the plugin methods were already tidied as part of #1856630: [Change notice] [META] Rename Views methods to core standards, e.g. [##2003270]

pwolanin’s picture

FileSize
11.08 KB

need some doxygen filled in yet, but here's a start.

pwolanin’s picture

Status: Active » Needs review
tim.plunkett’s picture

+++ b/core/modules/views/lib/Drupal/views/Plugin/views/query/QueryInterface.php
@@ -2,16 +2,173 @@
+  public function validateOptionsForm(&$form, &$form_state);
...
+  public function submitOptionsForm(&$form, &$form_state);

See, here's why these are hard to do. These methods should be on ViewsPluginInterface or something wayyyy higher up

dawehner’s picture

MHHH I don't think that views is in the state of having usable interfaces.

As written from tim in #4, that is d9 content.

damiankloip’s picture

Agreed, this issue is seriously old and outdated. It was probably forgotten about for a good reason :-) As with all other views plugins, you basically always extend the base class. That's how things are for views in d8. I think we pretty much all agreed they were a no go?

dawehner’s picture

FileSize
1.16 KB

I also think that for core it does not make sense to write a search views query interface.

Here is a slightly different approach.

damiankloip’s picture

Title: Add methods to Drupal\views\Plugin\query\QueryInterface » Remove Drupal\views\Plugin\query\QueryInterface

So..

tim.plunkett’s picture

Title: Remove Drupal\views\Plugin\query\QueryInterface » Add methods to Drupal\views\Plugin\query\QueryInterface
Status: Needs review » Reviewed & tested by the community

Yeah, let's be honest here.

tim.plunkett’s picture

Title: Add methods to Drupal\views\Plugin\query\QueryInterface » Remove Drupal\views\Plugin\query\QueryInterface
klonos’s picture

Does that mean that #2083717: Convert Search Results to Views won't happen after all? :/

Status: Reviewed & tested by the community » Needs work

The last submitted patch, vdc-1941672-7.patch, failed testing.

damiankloip’s picture

Why not?

damiankloip’s picture

Status: Needs work » Needs review

#7: vdc-1941672-7.patch queued for re-testing.

damiankloip’s picture

Status: Needs review » Reviewed & tested by the community
dawehner’s picture

I think it will still happen: #2083717-6: Convert Search Results to Views, just different.

klonos’s picture

Ok, that's encouraging news.

catch’s picture

Status: Reviewed & tested by the community » Fixed

Committed/pushed to 8.x, thanks!

Automatically closed -- issue fixed for 2 weeks with no activity.

derhasi’s picture