You are here

Video.php in Brightcove Video Connect 8

Same filename and directory in other branches
  1. 8.2 src/Video.php
  2. 3.x src/Video.php

Namespace

Drupal\brightcove

File

src/Video.php
View source
<?php

namespace Drupal\brightcove;

use Brightcove\Object\Video\Video as BrightcoveAPIWrapperVideo;

/**
 * Override Brightcove API Wrapper's Video class.
 */
class Video extends BrightcoveAPIWrapperVideo {

  /**
   * Override patch request to be able to alter the fields.
   */
  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;
  }

}

Classes

Namesort descending Description
Video Override Brightcove API Wrapper's Video class.