Skip to main content

Droost: Views Handlers

droost_views_handlers Read-only

Module: Droost Views

Which fields of a bundle Views can filter and sort, with the exact intent ops droost_views_compose accepts per filter plugin — resolved live from views.views_data. filter_ops null flags the plugins the composer does not speak yet.

Example call
{
    "tool": "droost_views_handlers",
    "arguments": {
        "bundle": "tool"
    }
}
Example response — captured live on this site
{
    "success": true,
    "message": "30 field(s) of node.tool have Views handlers on base table node_field_data (9 existing view(s) on that table). filter_ops lists what droost_views_compose accepts per field; filter_ops null means compose cannot filter that field yet.",
    "data": {
        "entity_type": "node",
        "bundle": "tool",
        "base_table": "node_field_data",
        "fields": {
            "changed": {
                "label": "Changed",
                "field_type": "changed",
                "base_field": true,
                "table": "node_field_data",
                "column": "changed",
                "filter_plugin": "date",
                "filter_ops": [
                    "equals",
                    "min",
                    "max",
                    "between"
                ],
                "sortable": true
            },
            "created": {
                "label": "Authored on",
                "field_type": "created",
                "base_field": true,
                "table": "node_field_data",
                "column": "created",
                "filter_plugin": "date",
                "filter_ops": [
                    "equals",
                    "min",
                    "max",
                    "between"
                ],
                "sortable": true
            },
            "default_langcode": {
          
… (truncated — run it yourself for the rest)

Resolves every field of an entity bundle to its Views handler coordinates: storage table/column, filter and sort plugin ids, and the filter ops droost_views_compose supports for it (equals, contains, in, min, max, between, …). Use before droost_views_compose to learn which fields are filterable/sortable and how. Also lists existing views on the same base table. Read-only.

Input schema (JSON Schema)
{
    "type": "object",
    "properties": {
        "entity_type": {
            "type": "string",
            "description": "Entity type id (default \"node\")."
        },
        "bundle": {
            "type": "string",
            "description": "Bundle machine name, e.g. \"vehicle\"."
        }
    },
    "required": [
        "bundle"
    ]
}