\YouTubePlaylist
Class YouTubePlaylist
Synopsis
class YouTubePlaylist
extends YouTubeDataObject
{
- // members
- private static string $singular_name = 'YouTube Playlist';
- private static string $plural_name = 'YouTube Playlists';
- private static string $description = 'A playlist of videos hosted and managed on YouTube';
- private static array $db = ;
- private $playlist_data;
- private $videos;
- // methods
- public FieldList getCMSFields()
- public ValidationResult validate()
- public void onBeforeWrite()
- protected bool extractPlaylistID()
- public HTMLText getEmbedCode()
- public mixed getYouTubeData()
- public $this setYouTubeData()
- public getVideos()
- public $this setVideos()
- // Inherited methods from YouTubeDataObject
- public mixed getYouTubeClient()
- public $this setYouTubeClient()
- protected void logError()
- public null|bool DataValue()
- protected null|string formatData()
- public array getYouTubeData()
- protected static array data_to_array()
Hierarchy
Extends
Members
private
- $db — array
- $description — string
- $playlist_data —
- $plural_name — string
- $singular_name — string
- $videos —
Methods
protected
- extractPlaylistID() — Return the playlist ID if the supplied url has a matching pattern {@link https://linuxpanda.wordpress.com/2013/07/24/ultimate-best-regex-pattern-to-get-grab-parse-youtube-video-id-from-any-youtube-link-url/}
public
- getCMSFields()
- getEmbedCode() — Return Playlist Embed code via a SilverStripe include
- getVideos() — Get videos' data within this playlist
- getYouTubeData() — Return YouTube data for this playlist
- onBeforeWrite() — Before writing the record, save the playlist ID for easier access later.
- setVideos() — Set videos' data within this playlist
- setYouTubeData() — Set YouTube data for this playlist
- validate()
Inherited from YouTubeDataObject
protected
- data_to_array() — Convert stdClass data structure to an associative array.
- formatData() — Format data passed in. Attempts to format whole numbers.
- logError() — Log or trigger an error based on environment
public
- DataValue() — Attempt to get the YouTube data based on api key/val pairs.
- getYouTubeClient() — Get reusable YouTube API Client
- getYouTubeData() — Return YouTube data array
- setYouTubeClient() — Set reusable YouTube API Client