function basic_cart_entity_delete in Basic cart 8
Same name and namespace in other branches
- 8.0 basic_cart.module \basic_cart_entity_delete()
- 8.2 basic_cart.module \basic_cart_entity_delete()
Implements hook_entity_delete().
File
- ./
basic_cart.module, line 123
Code
function basic_cart_entity_delete(EntityInterface $node) {
$utility = new Utility();
if (Utility::isBasicCartOrder($node
->bundle())) {
$entitytype = $node
->getEntityTypeId();
$id = $node
->id();
$bundle = $node
->bundle();
if (isset($entitytype) && isset($id)) {
$params['oid'] = $id;
$params['entitytype'] = $entitytype;
OrderConnectStorage::orderDelete($params);
}
}
}