public function deleteExistingObject(NodeInterface $node, Context $context, $dirtyAllowed = false)
 {
     /* @var $node EntityNode */
     $bundle = $node->getName();
     $exists = (int) db_query("SELECT 1 FROM {node} WHERE type = :type", array(':type' => $bundle));
     if ($exists) {
         $context->logDataloss(sprintf("%s: node type has nodes", $node->getPath()));
     }
     node_type_delete($bundle);
 }
 public function deleteExistingObject(NodeInterface $node, Context $context, $dirtyAllowed = false)
 {
     /* @var $node EntityNode */
     $bundle = $node->getBundle();
     $vocabulary = taxonomy_vocabulary_machine_name_load($bundle);
     $exists = (int) db_query("SELECT 1 FROM {taxonomy_term_data} d WHERE d.vid = :vid", [':vid' => $vocabulary->vid]);
     if ($exists) {
         $context->logDataloss(sprintf("%s: taxonomy vocabulary has terms", $node->getPath()));
     }
     taxonomy_vocabulary_delete($vocabulary->vid);
 }