You are here

public function FieldCollectionItem::delete in Field collection 8.3

Same name and namespace in other branches
  1. 8 src/Entity/FieldCollectionItem.php \Drupal\field_collection\Entity\FieldCollectionItem::delete()

Deletes an entity permanently.

Throws

\Drupal\Core\Entity\EntityStorageException In case of failures an exception is thrown.

Overrides EntityBase::delete

File

src/Entity/FieldCollectionItem.php, line 202

Class

FieldCollectionItem
Defines the field collection item entity class.

Namespace

Drupal\field_collection\Entity

Code

public function delete() {
  if (empty($this->field_collection_deleting) && $this
    ->getHost()) {
    $this
      ->deleteHostEntityReference();
  }
  parent::delete();
}