$query = db_query("SELECT * FROM `heritage_source_info`WHERE text_id = :textid AND format = :format ORDER BY type ASC", [':textid' => $textid, ':format' => 'text'])->orderBy('FIELD(type,moolam,translation,commentary)');
$available_sources_text = $query->fetchAll();
But it says call to an undefined function orderBy(). Could you help me with the correct syntax?
After upgrading to Drupal 8.9 or 9.0 all my custom modules always give the last result as if it's fully cached. I'm logged in as the admin user. On another web browser I get the same cached result.
I quickly wrote a simple module that shows the GET variables, a random number and the first line of a text file.
Each time I start it I get the same output. If I clear all caches in /admin/config/development/performance, I get one time the correct new data.
Hoping someone might be able to answer this for me. I have a custom module making use of derivative plugin blocks and not sure which one of these are the correct way to ensure the block names are unique:
Option #1) Do I simply save each newly created derivative plugin block name into the config entity using standard textfield and perhaps build my own method for ensuring that the derivative plugin block name is unique (not already in use)?
Quick Drupal 8 question as I'm a bit confused and hoping someone can clarify this. I have a custom module which makes use of a derivative plugin and as you can see from the code below I currently have the block ID's and labels hard-coded. But I plan on creating an config entity form to let users define their own block ID's/labels.