MIDDAG for Moodle

bunnynet_videos extends deprecated_item

Legacy item deprecated_model class.

Table of Contents

Constants

PERPAGE  = 50
STATUS_ACTIVE  = 'active'
STATUS_CANCELED  = 'canceled'
STATUS_COMPLETED  = 'completed'
STATUS_DELETED  = 'deleted'
STATUS_DISABLED  = 'disabled'
STATUS_DISAPPROVED  = 'disapproved'
STATUS_ENABLED  = 'enabled'
STATUS_EXPIRED  = 'expired'
STATUS_FAILED  = 'failed'
STATUS_FINISH  = 'finish'
STATUS_INACTIVE  = 'inactive'
STATUS_INPROGRESS  = 'inprogress'
STATUS_NEW  = 'new'
STATUS_PAUSED  = 'paused'
STATUS_PLAYED  = 'played'
STATUS_SYNC  = 'sync'
TYPE  = 'bunnynet_videos'

Properties

$availableResolutions  : null|string
The available resolutions of the video.
$averageWatchTime  : int
The average watch time of the video in seconds.
$captions  : null|array<string|int, mixed>
The list of captions available for the video.
$category  : null|string
The automatically detected category of the video.
$chapters  : null|array<string|int, mixed>
The list of chapters available for the video.
$collectionId  : null|string
The ID of the collection where the video belongs.
$contextid  : mixed
$courseid  : mixed
$dateUploaded  : DateTime
The date when the video was uploaded.
$description  : mixed
$descriptionformat  : mixed
$encodeProgress  : int
The current encode progress of the video.
$framerate  : float
The framerate of the video.
$fullname  : null|string
The title of the video.
$guid  : mixed
$hasMP4Fallback  : bool
Determines if the video has MP4 fallback files generated.
$height  : int
The height of the original video file.
$id  : mixed
$idnumber  : null|string
The unique ID of the video.
$isPublic  : bool
Determines if the video is publicly accessible.
$length  : int
The duration of the video in seconds.
$metaTags  : null|array<string|int, mixed>
The list of meta tags that have been added to the video.
$moments  : null|array<string|int, mixed>
The list of moments available for the video.
$parent  : int
The internal object for bunnynet_videolibrary.
$rotation  : null|int
The rotation of the video.
$shortname  : int
The ID of the video library that the video belongs to.
$sortorder  : mixed
$status  : int
The status of the video.
$storageSize  : int
The amount of storage used by this video.
$thumbnailCount  : int
The number of thumbnails generated for this video.
$thumbnailFileName  : null|string
The file name of the thumbnail inside of the storage.
$thumbnailUrl  : string
Thumbnail URL.
$timecreated  : mixed
$timemodified  : mixed
$totalWatchTime  : int
The total video watch time in seconds.
$transcodingMessages  : null|array<string|int, mixed>
The list of transcoding messages that describe potential issues while the video was transcoding.
$type  : mixed
$userid  : mixed
$usermodified  : mixed
$version  : mixed
$views  : int
The number of views the video received.
$visible  : mixed
$width  : int
The width of the original video file.
$fillable  : mixed
$table  : mixed
$table_metadata  : mixed

Methods

__clone()  : mixed
__construct()  : mixed
Constructor.
all()  : array<string|int, mixed>
create_or_update()  : bunnynet_videos|false
delete()  : bool
deleted()  : bool
disabled()  : bool
enabled()  : bool
get_all_metadata()  : array<string, mixed>
get_embed()  : bunnynet_videolibrary
get_file()  : mixed
Get file associated with the model.
get_fileurl()  : mixed
Get file URL.
get_item_or_create()  : deprecated_item
Factory method to get existing or create a new item.
get_items()  : array<string|int, deprecated_item>
get_items_by_metadata()  : array<string|int, mixed>
get_library()  : bunnynet_videolibrary
get_meta()  : mixed
Get metadata value by key.
get_path()  : string|null
get_records()  : array<string|int, deprecated_model_interface>
get_table()  : string|null
get_table_metadata()  : string
get_thumbnail()  : mixed
get_url()  : mixed
load()  : void
set_meta()  : void
Set metadata key-value pair.
set_metas()  : void
Set multiple metadata key-value pairs.
update()  : static
Update the model with form data.
url_generator()  : moodle_url
Generate a URL based on the Symfony route name and parameters.
webhook_url_generator()  : moodle_url
Generate a webhook URL.
from_record()  : static
get()  : false|mixed|stdClass
Get record by ID.
get_by_idnumber()  : false|mixed|stdClass
Get record by idnumber.
save()  : mixed

Constants

Properties

$availableResolutions

The available resolutions of the video.

public null|string $availableResolutions

$averageWatchTime

The average watch time of the video in seconds.

public int $averageWatchTime

$captions

The list of captions available for the video.

public null|array<string|int, mixed> $captions

$category

The automatically detected category of the video.

public null|string $category

$chapters

The list of chapters available for the video.

public null|array<string|int, mixed> $chapters

$collectionId

The ID of the collection where the video belongs.

public null|string $collectionId

$dateUploaded

The date when the video was uploaded.

public DateTime $dateUploaded

$encodeProgress

The current encode progress of the video.

public int $encodeProgress

$fullname

The title of the video.

public null|string $fullname
Tags
alias

$title

$hasMP4Fallback

Determines if the video has MP4 fallback files generated.

public bool $hasMP4Fallback

$idnumber

The unique ID of the video.

public null|string $idnumber
Tags
alias

$guid

$isPublic

Determines if the video is publicly accessible.

public bool $isPublic

$metaTags

The list of meta tags that have been added to the video.

public null|array<string|int, mixed> $metaTags

$moments

The list of moments available for the video.

public null|array<string|int, mixed> $moments

$parent

The internal object for bunnynet_videolibrary.

public int $parent

$shortname

The ID of the video library that the video belongs to.

public int $shortname
Tags
alias

$videoLibraryId

$status

The status of the video.

public int $status

0 = Created, 1 = Uploaded, 2 = Processing, 3 = Transcoding, 4 = Finished, 5 = Error, 6 = UploadFailed, 7 = Transcribing.

$storageSize

The amount of storage used by this video.

public int $storageSize

$thumbnailCount

The number of thumbnails generated for this video.

public int $thumbnailCount

$thumbnailFileName

The file name of the thumbnail inside of the storage.

public null|string $thumbnailFileName

$totalWatchTime

The total video watch time in seconds.

public int $totalWatchTime

$transcodingMessages

The list of transcoding messages that describe potential issues while the video was transcoding.

public null|array<string|int, mixed> $transcodingMessages

$fillable

protected mixed $fillable = ['views', 'storageSize', 'thumbnailUrl']

Methods

__construct()

Constructor.

public __construct([null|mixed $id = null ]) : mixed
Parameters
$id : null|mixed = null
Tags
throws
Exception

all()

public all() : array<string|int, mixed>
Return values
array<string|int, mixed>

create_or_update()

public static create_or_update(mixed $videoLibraryId, array<string|int, mixed> $videoData) : bunnynet_videos|false
Parameters
$videoLibraryId : mixed
$videoData : array<string|int, mixed>
Return values
bunnynet_videos|false

deleted()

public deleted() : bool
Tags
throws
dml_exception
Return values
bool

get_all_metadata()

public get_all_metadata() : array<string, mixed>
Return values
array<string, mixed>

get_file()

Get file associated with the model.

public get_file(mixed $context, mixed $component, mixed $filearea[, mixed $validimage = false ]) : mixed
Parameters
$context : mixed
$component : mixed
$filearea : mixed
$validimage : mixed = false
Tags
throws
coding_exception

get_fileurl()

Get file URL.

public static get_fileurl(mixed $file) : mixed
Parameters
$file : mixed

get_item_or_create()

Factory method to get existing or create a new item.

public static get_item_or_create(null|int|string $contextid[, string $type = '' ]) : deprecated_item
Parameters
$contextid : null|int|string
$type : string = ''
Tags
throws
dml_exception
Return values
deprecated_item

get_items()

public get_items(mixed $searchcriteria, mixed $page, mixed &$totalcount[, mixed $sort = '' ][, mixed $includedeleted = false ][, mixed $perpage = 0 ]) : array<string|int, deprecated_item>
Parameters
$searchcriteria : mixed
$page : mixed
$totalcount : mixed
$sort : mixed = ''
$includedeleted : mixed = false
$perpage : mixed = 0
Tags
throws
coding_exception
throws
dml_exception
Return values
array<string|int, deprecated_item>

get_items_by_metadata()

public get_items_by_metadata(array<string|int, mixed> $searchcriteriaitem, array<string|int, mixed> $searchcriteriameta, int $page, int &$totalcount[, null|string $sort = '' ][, bool $includedeleted = false ][, int $perpage = 0 ]) : array<string|int, mixed>

Migrate to core\repository\item_search_repository

Parameters
$searchcriteriaitem : array<string|int, mixed>
$searchcriteriameta : array<string|int, mixed>
$page : int
$totalcount : int
$sort : null|string = ''
$includedeleted : bool = false
$perpage : int = 0
Tags
throws
coding_exception
throws
dml_exception
Return values
array<string|int, mixed>

get_meta()

Get metadata value by key.

public get_meta(mixed $meta_key) : mixed
Parameters
$meta_key : mixed
Tags
throws
dml_exception

get_records()

public get_records(mixed $searchcriteria, mixed $page, mixed &$totalcount[, mixed $sort = '' ][, mixed $perpage = 0 ]) : array<string|int, deprecated_model_interface>
Parameters
$searchcriteria : mixed
$page : mixed
$totalcount : mixed
$sort : mixed = ''
$perpage : mixed = 0
Tags
throws
coding_exception
throws
dml_exception
Return values
array<string|int, deprecated_model_interface>

get_table_metadata()

public get_table_metadata() : string
Return values
string

load()

public load([mixed $reload = false ]) : void
Parameters
$reload : mixed = false

set_meta()

Set metadata key-value pair.

public set_meta(mixed $meta_key, mixed $meta_value) : void
Parameters
$meta_key : mixed
$meta_value : mixed
Tags
throws
dml_exception

set_metas()

Set multiple metadata key-value pairs.

public set_metas(array<string, mixed> $metas) : void
Parameters
$metas : array<string, mixed>

update()

Update the model with form data.

public update([array<string, mixed> $formdata = [] ]) : static
Parameters
$formdata : array<string, mixed> = []
Return values
static

url_generator()

Generate a URL based on the Symfony route name and parameters.

public static url_generator(string $route[, array<string|int, mixed> $parameters = [] ][, int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH ]) : moodle_url
Parameters
$route : string
$parameters : array<string|int, mixed> = []
$referenceType : int = UrlGeneratorInterface::ABSOLUTE_PATH
Return values
moodle_url

webhook_url_generator()

Generate a webhook URL.

public static webhook_url_generator(string $route[, array<string|int, mixed> $parameters = [] ][, int $referenceType = UrlGeneratorInterface::ABSOLUTE_PATH ]) : moodle_url
Parameters
$route : string
$parameters : array<string|int, mixed> = []
$referenceType : int = UrlGeneratorInterface::ABSOLUTE_PATH
Return values
moodle_url

from_record()

protected static from_record(stdClass $r) : static
Parameters
$r : stdClass
Return values
static

get()

Get record by ID.

protected get(mixed $id) : false|mixed|stdClass
Parameters
$id : mixed
Tags
throws
dml_exception
Return values
false|mixed|stdClass

get_by_idnumber()

Get record by idnumber.

protected get_by_idnumber(mixed $idnumber) : false|mixed|stdClass
Parameters
$idnumber : mixed
Tags
throws
dml_exception
Return values
false|mixed|stdClass

        
On this page

Search results