trying to find if node is bundle article
(node bundle = content type) before executing the rest of the statements in the following example
I can test if the entity is node
but I can't figure out how to test if content type is article
<?php
use \Drupal\Core\Entity\EntityInterface;
function MODULE_NAME_entity_presave(EntityInterface $entity){
//if content type is article
if ($entity->getEntityType()->id() == 'node') {
//do wonderful stuff ...
}
}