entityManage - a helper function for CRUD (create/update/delete + list) entity actions
Usage:
Load an entity object
$user = entityManage('user', 1);
$node = entityManage('node', 1);
Update a node's title
entityManage('node', 1, ['title' => 'New title']);
Get a list of inactive users
$inactiveUsers = entityManage('user', ['status' => 0]);
Get a list of taxonomy terms
$terms = entityManage('taxonomy_term', ['vid' => 'tags']);
Unknown timediff filter error
The time_diff filter is not a built-in Twig filter in Drupal 9. To achieve the desired functionality, you need to create a custom Twig filter.
Here's a step-by-step guide on how to add a custom time_diff filter in your Drupal 9 site:
Step 1: Create a Custom Module
First, create a custom module. For example, let's name it custom_twig_filters.
1. Create the module directory and files:
/modules/custom/custom_twig_filters/
Inside this directory, create the following files: