You are here

public function SimpleAccessProfile::delete in Simple Access 8.3

Deletes an entity permanently.

Throws

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

Overrides EntityBase::delete

File

src/Entity/SimpleAccessProfile.php, line 69

Class

SimpleAccessProfile
Defines SimpleAccessProfile config entity.

Namespace

Drupal\simple_access\Entity

Code

public function delete() {

  // Remove all records relating to this access group.
  \Drupal::database()
    ->delete('simple_access_node_profile')
    ->condition('pid', $this
    ->id())
    ->execute();
  parent::delete();
}