Source of file YouTubeVideoPlaylist.php
Size: 1,063 Bytes - Last Modified: 2021-12-23T10:05:44+00:00
/var/www/docs.ssmods.com/process/src/code/dataobjects/YouTubeVideoPlaylist.php
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556 | <?php /** * Class YouTubeVideoPlaylist * * @property string $Title * @method ManyManyList $Videos */ class YouTubeVideoPlaylist extends DataObject { /** * @var string */ private static $singular_name = 'YouTube Video Playlist'; /** * @var string */ private static $plural_name = 'YouTube Video Playlists'; /** * @var string */ private static $description = 'Playlist built in SilverStripe comprised of individual YouTube videos. (Not a YouTube Playlist)'; /** * @var array */ private static $db = [ 'Title' => 'Varchar(255)', ]; /** * @var array */ private static $summary_fields = [ 'Title' => 'Title', ]; /** * Validate that all requirements are met before writing to the database * * @return ValidationResult */ public function validate() { $result = parent::validate(); if (!$this->Title) { $result->error('A Title is required'); } return $result; } } |