Class: Spree::BackendConfiguration

Inherits:
Preferences::Configuration
  • Object
show all
Defined in:
lib/spree/backend_configuration.rb,
lib/spree/backend_configuration/menu_item.rb

Defined Under Namespace

Classes: MenuItem

Instance Attribute Summary collapse

Instance Method Summary collapse

Instance Attribute Details

Return the menu items which should be drawn in the menu



69
# File 'lib/spree/backend_configuration.rb', line 69

attr_writer :menu_items

#themeString

Returns Default admin theme name.

Returns:

  • (String)

    Default admin theme name



19
# File 'lib/spree/backend_configuration.rb', line 19

versioned_preference :theme, :string, initial_value: 'classic', boundaries: { "4.1.0.a" => "solidus_admin" }

#themesHash

Returns A hash containing the themes that are available for the admin panel.

Returns:

  • (Hash)

    A hash containing the themes that are available for the admin panel



12
13
14
15
# File 'lib/spree/backend_configuration.rb', line 12

preference :themes, :hash, default: {
  classic: 'spree/backend/all',
  solidus_admin: 'spree/backend/themes/solidus_admin'
}

Instance Method Details

#theme_path(user_theme = nil) ⇒ Object



21
22
23
# File 'lib/spree/backend_configuration.rb', line 21

def theme_path(user_theme = nil)
  user_theme ? themes.fetch(user_theme.to_sym) : themes.fetch(theme.to_sym)
end