I want to add a field of type entity_reference with unlimited values (programmatically) to a Content type. Can you please give me some examples? The ones that I found online are not very clear.
I have a custom module inside the custom profile and this module provides a new custom content entity, which is translatable. After site installation, the status page says that entity updates are needed for this custom entity and it needs to remove some translation-related fields like author, status, created, changed. If I apply these updates, nothing changes, everything seems to be working. These fields are all marked as translatable in entity class and the logic inside ContentTranslationHandler::getFieldDefinitions() shouldn't apply, although I think maybe it does somehow.
I've successfully applied patches for modules, but when I add the following to my composer file, nothing happens (tried running composer install, composer update, composer update --lock). I don't get an error, I don't get anything.
I am trying to delete a field from a database named my_database. I am trying to use hook_entity_delete, in my .module file. I have tried to use something like :
function mymodule_entity_delete(Drupal\Core\Entity\EntityInterface $entity) {