You are here

Playlist.php in Brightcove Video Connect 3.x

Same filename and directory in other branches
  1. 8.2 src/Playlist.php
  2. 8 src/Playlist.php

Namespace

Drupal\brightcove

File

src/Playlist.php
View source
<?php

namespace Drupal\brightcove;

use Brightcove\Item\Playlist as BrightcoveAPIWrapperPlaylist;

/**
 * Override Brightcove API Wrapper's Playlist class.
 */
class Playlist extends BrightcoveAPIWrapperPlaylist {

  /**
   * 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['id'])) {
      unset($data['id']);
    }
    return $data;
  }

}

Classes

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