You are here

public function Playlist::patchJson in Brightcove Video Connect 8.2

Same name and namespace in other branches
  1. 8 src/Playlist.php \Drupal\brightcove\Playlist::patchJson()
  2. 3.x src/Playlist.php \Drupal\brightcove\Playlist::patchJson()

Override patch request to be able to alter the fields.

File

src/Playlist.php, line 15

Class

Playlist
Override Brightcove API Wrapper's Playlist class.

Namespace

Drupal\brightcove

Code

public function patchJson() {
  $data = parent::patchJSON();

  // Remove fields which are not needed to be sent to Brightcove.
  if (isset($data['id'])) {
    unset($data['id']);
  }
  return $data;
}