During development you regulary have to make changes to your data model. e.g. create new entities or change exitisting ones. To check this changes in use hook_update_N and
Read this change record for update functions for entity schema updates (doc needs update).
If you need a sophisticated solution including an API the metatag module is for you. An short post about it by Jeffrey McGuire.
If you don’t feel the need of an module and simply want to set some static global metatags, you can do it by implementing the hook_page_attachements. A good example is the system modules implementation.
Actually it is sufficient to google react and flux. You will find enough good sources to read for days.
But this post by Lin Clark on medium is so good, I have to keep it here.
A cartoon guide to Flux
Today I needed to know which JQM version is available in a certain context. Maybe I wasn’t clever enough to use the right search terms. Howsoever, it took far to long to google the answer.
console.log("JQM version: " + $.mobile.version);
Okay, I could have guessed that one. 😉
Good sources for quick overview:
Definition of routes happens in yourmodule.config.yml. The structure of a route definition is documented on d.o., but documentation is incomplete.
Especially I couldn’t find any useful documentaction on how to restrict the route definition to a specific method (in my case GET). The symfony way of using
methods: [GET] doesn’t work. Seems that drupal is using a depreciated way of defining the allowed methods. Symfony’s route.php on github (see setMethods)
The solution as today is to put an _method definition under the requirements section in the yaml file:
Note that you have to use a string, even in case of more than one method. Example: ‘GET|POST’.
Change record on d.o. on upgrading to symfony 3.0 in a subsequent minor release.
See also the upgrade notes from the symonfy team at github. According to these docs, the structure of the routing definitcccion will likely change soon.
To setup other HTTP Methods than GET and POST for your route, you can use symfony’s fake method parameter in the query string. I didn’t test if this actually works on a D8 installation yet.