Hello,
I am trying to understand Unit testing (Drupal 9). To this purpose I am going through the pertinent chapter of Daniel Sipos' book "Module Development". Somehow class Calculator is not recognised. Here comes a code snippet of both CalculatorTestClass and Class Calculator (to be tested).
(1) from file ~/drupalroot/web/modules/custom/hello_world/src/Calculator.php
Hello, new with Drupal, doing my first project on it. I'll try to be as short as possible.
I have a form field, type file, which by default is required. And i want this state to change based on another field's state. More precisely, a checkbox type field. You can see the problem in this image (follow the links for the images, sorry but i didn't manage to understand how to embed an image on this forum):
I need to filter some data in bae to a multivare Entity reference field.
If I have to filter an entity reference field for a multivalue I have understood how to do it but I have not understood how to do the opposite.
The field is an entity reference field_categoria, multivalued entity reference, I tried various possibilities but none of them work for me
After reading a lot of posts, testing with postman several things I still can't figure out
how to use the REST API for creating content and more generally how to use the core REST API.
Where I am until now
I'm just trying to create a simple page as a starting point.
In the header section of POSTMAN :
'Content-Type': 'application/hal+json',
'X-CSRF-Token': 'MYTOKEN FROM /session/token',
'Accept': 'application/hal+json',