Score:0

How do I programmatically provide an exposed filter value to a view?

in flag

I am validating the creation of a new node in code thus $form['#entity_builders'][] = '_my_node_builder;

In this validation code I would like to check that my_view returns no results when its exposed filter is provided with a string.

In the code at _my_node_builder

  1. how do invoke the view programmatically?
  2. ... providing the view with the exposed filter string?
  3. how do I check the cardinality of the viewed results?
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.