I've used Drupal 8 using twig mostly. Now I need to add this functionality to the website.
1) Using a html form, submit a query for a location (zip or address)
2) Taking the input, send a Web API query in PHP using curl to return a JSON list of branches near this geopoint. The API query needs to happen on the backend.
3) Using the JSON in javascript, parse the results.
I am trying to update a content type source_node using hook_entity_update as follows: I am getting an error for using $entity->getType() == 'source_node'
I have tried using $entity->getEntityType() == 'source_node' but it is not updating correctly.
function heritage_schema_entity_update(Drupal\Core\Entity\EntityInterface $entity) {