A typical example of querying is getting the row count. This snippet shows you how.
The form API in core is great, but without contributed modules it lacks a bit of sweetness for html 5.
The Form API changed a bit over the years. This is the way add a html field to a form in drupal 8 & 9.
This blogposts gives you a summary on how to upgrade to drupal 9 and fix all composer issues.
This snippet works starting in drupal 8.8 and replaces older deprecated ones.
When using the node system we have a checkbox on the edit page to deactivate a log field. For custom entities we need to do it ourselves.
Drupal is using more and more AccessResult objects for access checking. Here is a list of all the access results available.
Moderation states help you give entities a state in workflows. Here is how to update your entity programmatically to a published workflow.