Class: Biovision::Components::ContentComponent

Inherits:
BaseComponent show all
Defined in:
app/lib/biovision/components/content_component.rb

Overview

Content

Instance Attribute Summary

Attributes inherited from BaseComponent

#component, #name, #slug, #user

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseComponent

[], active?, create, #data_value, #find_or_create_code, form_options, handler, handler_class, #initialize, #new_entity, #register_metric, #settings, #settings=, slug, #update_data_value, #update_entity, #use_settings?

Methods included from Base::ComponentSettings

#default_settings, #normalize_settings, #reset_settings, #settings_flags, #settings_numbers, #settings_strings

Methods included from Base::ImageHandling

#upload_image

Methods included from Base::EntityLinks

#entity_link, #rest_entity_link, #text_for_link

Methods included from Base::ComponentParameters

#[], #[]=, #manage_settings?, #receive, #use_files?

Methods included from Base::ComponentPrivileges

#create_roles, #model_from_context, #owner?, #permit?, #role?, #role_tree

Constructor Details

This class inherits a constructor from Biovision::Components::BaseComponent

Class Method Details

.dependent_modelsObject



7
8
9
10
11
12
# File 'app/lib/biovision/components/content_component.rb', line 7

def self.dependent_models
  [
    DynamicPage, NavigationGroup, NavigationGroupPage, DynamicBlock,
    OembedReceiver, OembedDomain, OembedLink
  ]
end

.seedObject



14
15
16
17
18
19
20
# File 'app/lib/biovision/components/content_component.rb', line 14

def self.seed
  [
    Biovision::Components::Content::Oembed::VimeoReceiver,
    Biovision::Components::Content::Oembed::YoutubeReceiver,
    Biovision::Components::Content::Oembed::TwitterReceiver
  ].each(&:seed)
end

Instance Method Details

#administrative_partsObject



34
35
36
# File 'app/lib/biovision/components/content_component.rb', line 34

def administrative_parts
  %w[navigation_groups dynamic_blocks dynamic_pages oembed_links]
end

#crud_table_namesObject



30
31
32
# File 'app/lib/biovision/components/content_component.rb', line 30

def crud_table_names
  super - %w[navigation_group_pages oembed_receivers oembed_domains]
end


38
39
40
# File 'app/lib/biovision/components/content_component.rb', line 38

def navigation
  @navigation ||= prepare_navigation
end

#use_images?Boolean

Returns:

  • (Boolean)


26
27
28
# File 'app/lib/biovision/components/content_component.rb', line 26

def use_images?
  true
end

#use_parameters?Boolean

Returns:

  • (Boolean)


22
23
24
# File 'app/lib/biovision/components/content_component.rb', line 22

def use_parameters?
  true
end