Please let me know how can I set the field widget property programmatically. Here is the screenshot of the Manage Form Display of my website, I am trying to set the widget of the field Positional Index to Simple Hierarchical Select programmatically..
I've written a Drupal 7 module called Block in block, and created a sandbox project for it. I would appreciate it if some people would look at it and let me know if they see any issues or problems with the module, or have any suggestions. This includes the description on the project page, README.md, changes needed before requesting promotion, etc. Feel free to let me know if there is a better place for me to ask this.
I have a problem with Schema API in paritcular context. I understand the mechanism of Schema API for adding new Tables in Drupal Database from module_schema hook in mymodule.install file, But I can not do it when it comes to another database ?!
I use Drupal 8, search API and a search view with infinite scroll (10 results per page). In a header field I display the number of search results with @total. Unfortunately, @total is always a maximum of 10, even for searches that should actually have 500 hits.
To determine the correct number of search results, I did the following in a custom module
function my_module_views_pre_render(ViewExecutable $view) {
if ($view->id() == 'myview' ) {
/*
* calculate proper number of search results with a tmp view
*/