Skip to content

Commit

Permalink
feat(#63): add sphere media type
Browse files Browse the repository at this point in the history
  • Loading branch information
Decipher committed Apr 25, 2022
1 parent 40bdf88 commit e607374
Show file tree
Hide file tree
Showing 8 changed files with 226 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
uuid: 7a0736a3-b9e0-4546-bf86-d8546ff8219f
langcode: en
status: true
dependencies:
config:
- field.field.media.sphere.field_media_image
- image.style.thumbnail
- media.type.sphere
module:
- image
- path
id: media.sphere.default
targetEntityType: media
bundle: sphere
mode: default
content:
created:
type: datetime_timestamp
weight: 10
region: content
settings: { }
third_party_settings: { }
field_media_image:
type: image_image
weight: 0
region: content
settings:
progress_indicator: throbber
preview_image_style: thumbnail
third_party_settings: { }
langcode:
type: language_select
weight: 2
region: content
settings:
include_locked: true
third_party_settings: { }
name:
type: string_textfield
weight: -5
region: content
settings:
size: 60
placeholder: ''
third_party_settings: { }
path:
type: path
weight: 30
region: content
settings: { }
third_party_settings: { }
status:
type: boolean_checkbox
weight: 100
region: content
settings:
display_label: true
third_party_settings: { }
uid:
type: entity_reference_autocomplete
weight: 5
region: content
settings:
match_operator: CONTAINS
match_limit: 10
size: 60
placeholder: ''
third_party_settings: { }
hidden: { }
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
uuid: d71db15b-dabc-43aa-b383-974be15b9c81
langcode: en
status: true
dependencies:
config:
- core.entity_form_mode.media.media_library
- field.field.media.sphere.field_media_image
- image.style.thumbnail
- media.type.sphere
module:
- image
id: media.sphere.media_library
targetEntityType: media
bundle: sphere
mode: media_library
content:
field_media_image:
type: image_image
weight: -50
region: content
settings:
progress_indicator: throbber
preview_image_style: thumbnail
third_party_settings: { }
hidden:
created: true
langcode: true
name: true
path: true
status: true
uid: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
uuid: 35050b11-e64b-44b7-a0b4-ce1f77b1dd3c
langcode: en
status: true
dependencies:
config:
- field.field.media.sphere.field_media_image
- image.style.large
- media.type.sphere
module:
- image
id: media.sphere.default
targetEntityType: media
bundle: sphere
mode: default
content:
field_media_image:
type: image
label: visually_hidden
settings:
image_link: ''
image_style: large
third_party_settings: { }
weight: 0
region: content
hidden:
created: true
langcode: true
name: true
thumbnail: true
uid: true
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
uuid: cfebef12-2d67-4510-9e62-ecdea72d1c5a
langcode: en
status: true
dependencies:
config:
- core.entity_view_mode.media.media_library
- field.field.media.sphere.field_media_image
- image.style.medium
- media.type.sphere
module:
- image
id: media.sphere.media_library
targetEntityType: media
bundle: sphere
mode: media_library
content:
thumbnail:
type: image
label: hidden
settings:
image_link: ''
image_style: medium
third_party_settings: { }
weight: 0
region: content
hidden:
created: true
field_media_image: true
langcode: true
name: true
uid: true
38 changes: 38 additions & 0 deletions drupal/config/sync/field.field.media.sphere.field_media_image.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
uuid: b003f802-103e-4767-8dae-edf416dbe78f
langcode: en
status: true
dependencies:
config:
- field.storage.media.field_media_image
- media.type.sphere
module:
- image
id: media.sphere.field_media_image
field_name: field_media_image
entity_type: media
bundle: sphere
label: Image
description: ''
required: true
translatable: true
default_value: { }
default_value_callback: ''
settings:
handler: 'default:file'
handler_settings: { }
file_directory: '[date:custom:Y]-[date:custom:m]'
file_extensions: 'png gif jpg jpeg'
max_filesize: ''
max_resolution: ''
min_resolution: ''
alt_field: true
alt_field_required: true
title_field: false
title_field_required: false
default_image:
uuid: null
alt: ''
title: ''
width: null
height: null
field_type: image
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ dependencies:
- field.storage.paragraph.field_media
- media.type.document
- media.type.image
- media.type.sphere
- media.type.video
- paragraphs.paragraphs_type.media
id: paragraph.media.field_media
Expand All @@ -24,6 +25,7 @@ settings:
target_bundles:
document: document
image: image
sphere: sphere
video: video
sort:
field: _none
Expand Down
11 changes: 11 additions & 0 deletions drupal/config/sync/language.content_settings.media.sphere.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
uuid: d89edcf8-f7d3-407c-af0d-8547258807a8
langcode: en
status: true
dependencies:
config:
- media.type.sphere
id: media.sphere
target_entity_type_id: media
target_bundle: sphere
default_langcode: site_default
language_alterable: false
14 changes: 14 additions & 0 deletions drupal/config/sync/media.type.sphere.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
uuid: a53bca9f-f92b-4bc6-8f0a-aa7602cb19f0
langcode: en
status: true
dependencies: { }
id: sphere
label: Sphere
description: 'Photo spheres and 360° panoramas'
source: image
queue_thumbnail_downloads: false
new_revision: false
source_configuration:
source_field: field_media_image
field_map:
name: name

0 comments on commit e607374

Please sign in to comment.