0

I'm learning about Views handlers and need some clarification on how its built.

Looking through the Views Bulk Operations module as seen below. There are 2 IF statements that checks for base table name and revision table. Now my questions are:

  • When it says table, are they referencing to a table name in the database?
  • title, group, help, etc... where can I find a list of other parameters for this as seen below in the screen shot?
  • These fields show up when you click on the "add field" button in the View, but what dictates if it shows up in a content type or user type view?

enter image description here

0

When it says table, are they referencing to a table name in the database?

Often yes, but not always. A Search API index View declares a "table", for example, but if Solr etc. integration is enabled, it won't necessarily be talking to a database/table. A lot of the time though, yes, a "table" tells Views the base table to select data from; the FROM part of the SQL query.

where can I find a list of other parameters for this as seen below in the screen shot?

The hook_views_data() API docs walk you through all the possibilities in comments and code.

These fields show up when you click on the "add field" button in the View, but what dictates if it shows up in a content type or user type view?

The loop in the code you've shown, combined with the condition immediately after. All entity types are looped over, and if their known Views data has a base and/or revision database table, a new field is added to provide operations (because VBO knows it can process those "tables").

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.