You are here

public function BrightcovePlaylist::delete in Brightcove Video Connect 8

Same name and namespace in other branches
  1. 8.2 src/Entity/BrightcovePlaylist.php \Drupal\brightcove\Entity\BrightcovePlaylist::delete()
  2. 3.x src/Entity/BrightcovePlaylist.php \Drupal\brightcove\Entity\BrightcovePlaylist::delete()

Parameters

bool $local_only: Whether to delete the local version only or both local and Brightcove versions.

Overrides EntityBase::delete

File

src/Entity/BrightcovePlaylist.php, line 355

Class

BrightcovePlaylist
Defines the Brightcove Playlist.

Namespace

Drupal\brightcove\Entity

Code

public function delete($local_only = FALSE) {

  // Delete playlist from Brightcove.
  if (!$this
    ->isNew() && !$local_only) {
    $cms = BrightcoveUtil::getCmsApi($this
      ->getApiClient());
    $cms
      ->deletePlaylist($this
      ->getPlaylistId());
  }
  parent::delete();
}