Blog
Count query results of entityQuery in drupal 8 or 9
A typical example of querying is getting the row count. This snippet shows you how.
Blog
Add a html5 number field in a drupal 8 or 9 form
The form API in core is great, but without contributed modules it lacks a bit of sweetness for html 5.
Blog
Add a html field to a form in drupal 8 & 9
The Form API changed a bit over the years. This is the way add a html field to a form in drupal 8 & 9.
Blog
Get all vocabularies in drupal 8 & 9
This snippet works starting in drupal 8.8 and replaces older deprecated ones.
Blog
Hide revision log field on a entity form
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.
Blog
List of AccessResult types in drupal 8 & 9
Drupal is using more and more AccessResult objects for access checking. Here is a list of all the access results available.
Blog
Set moderation state programmatically in drupal 8
Moderation states help you give entities a state in workflows. Here is how to update your entity programmatically to a published workflow.
Blog
Get the moderation state of entity or node programmatically in drupal 8
Worfklows are a powerful tool to add events and states to your entities.
Blog
Add a menu item to the drupal toolbar
I like being consistent over every back-end I make. Custom forms with settings need to be available from the toolbar.
Blog
Fix error: The config sync directory is not defined in $settings["config_sync_directory"]
This error occurs when installing a drupal 9 installation.
Pagination
- Previous page
- Page 20
- Next page