You are here

function uc_attribute_node_type_delete in Ubercart 8.4

Implements hook_node_type_delete().

File

uc_attribute/uc_attribute.module, line 341
Ubercart Attribute module.

Code

function uc_attribute_node_type_delete(NodeTypeInterface $type) {
  $connection = \Drupal::database();
  $connection
    ->delete('uc_class_attributes')
    ->condition('pcid', $type
    ->id())
    ->execute();
  $connection
    ->delete('uc_class_attribute_options')
    ->condition('pcid', $type
    ->id())
    ->execute();
}