Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Commit

Permalink
Add missing schema and default values
Browse files Browse the repository at this point in the history
  • Loading branch information
chrfritsch authored Apr 23, 2020
1 parent d2ffbc0 commit a079b24
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 3 deletions.
2 changes: 2 additions & 0 deletions config/optional/media.type.nexx_video.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@ source_configuration:
channel_field: ''
actor_field: ''
teaser_image_field: field_preview_image
tag_field: ''
description_field: ''
field_map: { }
9 changes: 6 additions & 3 deletions config/schema/nexx_integration.schema.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,6 @@ media.source.nexx_video:
type: media.source.field_aware
label: 'Nexx video configuration'
mapping:
source_field:
type: string
label: 'Field with embed code/URL'
channel_field:
type: string
label: 'Channel'
Expand All @@ -40,6 +37,12 @@ media.source.nexx_video:
teaser_image_field:
type: string
label: 'Teaser image'
description_field:
type: string
label: 'Description field mapping'
tag_field:
type: string
label: 'Actor taxonomy field mapping'

field.value.nexx_video_data:
type: mapping
Expand Down
13 changes: 13 additions & 0 deletions src/Plugin/media/Source/NexxVideo.php
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,19 @@ public function getMetadata(MediaInterface $media, $name) {
return FALSE;
}

/**
* {@inheritdoc}
*/
public function defaultConfiguration() {
return [
'description_field' => '',
'channel_field' => '',
'tag_field' => '',
'teaser_image_field' => '',
'actor_field' => '',
] + parent::defaultConfiguration();
}

/**
* {@inheritdoc}
*/
Expand Down

0 comments on commit a079b24

Please sign in to comment.