Class: Promethee::StructureUpgrader::Components::SliderItem

Inherits:
Base
  • Object
show all
Defined in:
app/services/promethee/structure_upgrader/components/slider_item.rb

Instance Method Summary collapse

Methods inherited from Base

#initialize, #upgrade, #upgraded_data

Constructor Details

This class inherits a constructor from Promethee::StructureUpgrader::Components::Base

Instance Method Details

#upgraded_attributesObject



22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
# File 'app/services/promethee/structure_upgrader/components/slider_item.rb', line 22

def upgraded_attributes
  {
    'caption' => {
      'searchable' => true,
      'translatable' => true,
      'type' => 'text',
      'value' => attribute('searchable_caption')
    },
    'media_type' => {
      'collection' => [
        { 'label' => 'Image', 'value' => 'image' },
        { 'label' => 'Video', 'value' => 'video' }
      ],
      'searchable' => false,
      'translatable' => false,
      'type' => 'enum',
      'value' => attribute('media_type')
    },
    'image' => {
      'searchable' => false,
      'translatable' => false,
      'type' => 'blob',
      'value' => attribute('image')
    },
    'video' => {
      'searchable' => false,
      'translatable' => true,
      'type' => 'string',
      'value' => attribute('video', 'url')
    }
  }
end