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.
24 25 26 27 28 29 30 31 32 33 |
# File 'lib/pageflow/built_in_page_type.rb', line 24 def self.audio Pageflow::React.create_page_type('audio', thumbnail_candidates: default_thumbnail_candidates, export_version: Pageflow::VERSION, 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.
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 72 73 74 |
# File 'lib/pageflow/built_in_page_type.rb', line 43 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 12 |
# 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, export_version: Pageflow::VERSION, 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.
14 15 16 17 18 19 20 21 22 |
# File 'lib/pageflow/built_in_page_type.rb', line 14 def self.video Pageflow::React.create_page_type('video', thumbnail_candidates: video_thumbnail_candidates, export_version: Pageflow::VERSION, 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.
35 36 37 38 39 40 41 |
# File 'lib/pageflow/built_in_page_type.rb', line 35 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 |