public function removeByLayoutEntity(EntityInterface $entity) { $query = $this->database ->update('inline_block_usage') ->fields([ 'layout_entity_type' => NULL, 'layout_entity_id' => NULL, ]); $query->condition('layout_entity_type', $entity->getEntityTypeId()); $query->condition('layout_entity_id', $entity->id()); $query->execute(); }