You are here

public function Video::patchJson in Brightcove Video Connect 8

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

Override patch request to be able to alter the fields.

File

src/Video.php, line 15

Class

Video
Override Brightcove API Wrapper's Video 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['account_id'])) {
    unset($data['account_id']);
  }
  if (isset($data['id'])) {
    unset($data['id']);
  }
  return $data;
}