Class: CamaleonCms::Widget::Main

Inherits:
TermTaxonomy show all
Defined in:
app/models/camaleon_cms/widget/main.rb

Constant Summary

Constants inherited from CamaleonRecord

CamaleonRecord::TRANSLATION_TAG_HIDE_MAP, CamaleonRecord::TRANSLATION_TAG_HIDE_REGEX, CamaleonRecord::TRANSLATION_TAG_HIDE_SENTINELS, CamaleonRecord::TRANSLATION_TAG_RESTORE_MAP, CamaleonRecord::TRANSLATION_TAG_RESTORE_REGEX

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from TermTaxonomy

#children, find_sti_class, #in_nav_menu_items, inherited, polymorphic_name, #skip_slug_validation?

Methods included from NormalizeAttrs

#normalize_attrs

Methods included from CustomFieldsRead

#add_custom_field_group, #add_custom_field_to_default_group, #get_field_groups, #get_field_object, #get_field_value, #get_field_values, #get_field_values_hash, #get_fields_grouped, #get_fields_object, #get_user_field_groups, #save_field_value, #set_field_value, #set_field_values, #update_field_value

Methods included from Metas

#delete_meta, #delete_option, #fix_save_metas_options_no_changed, #get_meta, #get_option, #options, #save_metas_options, #save_metas_options_skip, #set_meta, #set_metas, #set_option, #set_options

Methods inherited from CamaleonRecord

#ability, #cama_build_cache_key, #cama_fetch_cache, #cama_get_cache, #cama_remove_cache, cama_sanitize_translatable, #cama_set_cache, #can?, #current_site, #current_user, polymorphic_class_for, polymorphic_name, #reset_ability

Instance Attribute Details

#excerptObject



33
34
35
# File 'app/models/camaleon_cms/widget/main.rb', line 33

def excerpt
  get_option('excerpt')
end

#rendererObject



37
38
39
# File 'app/models/camaleon_cms/widget/main.rb', line 37

def renderer
  get_option('renderer')
end

Class Method Details

.sti_nameObject



4
5
6
# File 'app/models/camaleon_cms/widget/main.rb', line 4

def self.sti_name
  'widget'
end

Instance Method Details

#is_simple?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'app/models/camaleon_cms/widget/main.rb', line 27

def is_simple?
  status == 'simple'
end

#short_codeObject



41
42
43
# File 'app/models/camaleon_cms/widget/main.rb', line 41

def short_code
  "[widget #{slug}]"
end