Module: Pageflow::BuiltInPageType Private
- Defined in:
- lib/pageflow/built_in_page_type.rb
This module is part of a private API. You should avoid using this module if possible, as it may be removed or be changed in the future.
Class Method Summary collapse
- .audio ⇒ Object private
- .default_thumbnail_candidates ⇒ Object private
- .plain ⇒ Object private
- .video ⇒ Object private
- .video_thumbnail_candidates ⇒ Object private
Class Method Details
.audio ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
22 23 24 25 26 27 28 29 30 |
# File 'lib/pageflow/built_in_page_type.rb', line 22 def self.audio Pageflow::React.create_page_type('audio', thumbnail_candidates: default_thumbnail_candidates, file_types: [ BuiltInFileType.audio, BuiltInFileType.image, BuiltInFileType.video ]) end |
.default_thumbnail_candidates ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/pageflow/built_in_page_type.rb', line 40 def self.default_thumbnail_candidates [ { file_collection: 'image_files', attribute: 'thumbnail_image_id' }, { file_collection: 'image_files', attribute: 'background_image_id', unless: { attribute: 'background_type', value: 'video' } }, { file_collection: 'image_files', attribute: 'poster_image_id', if: { attribute: 'background_type', value: 'video' } }, { file_collection: 'video_files', attribute: 'video_file_id', if: { attribute: 'background_type', value: 'video' } } ] end |
.plain ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
4 5 6 7 8 9 10 11 |
# File 'lib/pageflow/built_in_page_type.rb', line 4 def self.plain Pageflow::React.create_page_type('background_image', thumbnail_candidates: default_thumbnail_candidates, file_types: [ BuiltInFileType.image, BuiltInFileType.video ]) end |
.video ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
13 14 15 16 17 18 19 20 |
# File 'lib/pageflow/built_in_page_type.rb', line 13 def self.video Pageflow::React.create_page_type('video', thumbnail_candidates: video_thumbnail_candidates, file_types: [ BuiltInFileType.image, BuiltInFileType.video ]) end |
.video_thumbnail_candidates ⇒ Object
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
32 33 34 35 36 37 38 |
# File 'lib/pageflow/built_in_page_type.rb', line 32 def self.video_thumbnail_candidates [ {file_collection: 'image_files', attribute: 'thumbnail_image_id'}, {file_collection: 'image_files', attribute: 'poster_image_id'}, {file_collection: 'video_files', attribute: 'video_file_id'} ] end |