You are here

public function AssetInjectorBase::delete in Asset Injector 8

Same name and namespace in other branches
  1. 8.2 src/Entity/AssetInjectorBase.php \Drupal\asset_injector\Entity\AssetInjectorBase::delete()

On delete delete this asset's file(s).

Overrides EntityBase::delete

File

src/Entity/AssetInjectorBase.php, line 160

Class

AssetInjectorBase
Class AssetInjectorBase: Base asset injector class.

Namespace

Drupal\asset_injector\Entity

Code

public function delete() {
  $storage = new AssetFileStorage($this);
  $storage
    ->deleteFiles();
  parent::delete();
}