Class: LWS::DigitalSignage::Layout::Element

Inherits:
Generic::Model
  • Object
show all
Defined in:
lib/lws/apps/digital_signage.rb

Overview

Note:

This class is only used within the context of the Version class.

The layout element class

Defined Under Namespace

Classes: Customizable, Property

Instance Attribute Summary collapse

Attributes inherited from Generic::Model

#created_at, #id, #updated_at, #url, #url_html

Method Summary

Methods inherited from Generic::Model

#deep_dup, #dig, #reload, #rollback, #save

Instance Attribute Details

#asset_storage_idsArray<String>

Returns the storage IDs of the assets of the layout element.

Returns:

  • (Array<String>)

    the storage IDs of the assets of the layout element



642
# File 'lib/lws/apps/digital_signage.rb', line 642

attribute :asset_storage_ids

#asset_urlsArray<Hash{String => String}>

This is a list of mappings of the asset filename (key “filename”) to the asset URL (key “url”).

Returns:

  • (Array<Hash{String => String}>)

    the assets of the layout element



649
# File 'lib/lws/apps/digital_signage.rb', line 649

attribute :asset_urls

#customizablesArray<Layout::Element::Customizable>

Returns the customizable properties of the layout element.

Returns:



654
# File 'lib/lws/apps/digital_signage.rb', line 654

has_many :customizables, class_name: "LWS::DigitalSignage::Layout::Element::Customizable"

#definitionHash

Note:

This attribute is only available if the token is of an account with sysadmin permissions

Returns the (plugin) component definition of the layout element.

Returns:

  • (Hash)

    the (plugin) component definition of the layout element



660
# File 'lib/lws/apps/digital_signage.rb', line 660

attribute :definition

#indexInteger?

Returns the index of the element within the list of layout elements of the associated layout version.

Returns:

  • (Integer, nil)

    the index of the element within the list of layout elements of the associated layout version



665
# File 'lib/lws/apps/digital_signage.rb', line 665

attribute :index

#klassString

Returns the class of the layout element.

Returns:

  • (String)

    the class of the layout element



669
# File 'lib/lws/apps/digital_signage.rb', line 669

attribute :klass

#parentLayout?

Returns the parent of the layout element.

Returns:

  • (Layout, nil)

    the parent of the layout element



674
675
# File 'lib/lws/apps/digital_signage.rb', line 674

belongs_to :parent, class_name: "LWS::DigitalSignage::Layout::Element",
foreign_key: :parent_id

#parent_idInteger?

Returns the ID of the parent of the layout element.

Returns:

  • (Integer, nil)

    the ID of the parent of the layout element



679
# File 'lib/lws/apps/digital_signage.rb', line 679

attribute :parent_id

#propertiesArray<Layout::Element::Property>

Returns the properties of the layout element.

Returns:



684
# File 'lib/lws/apps/digital_signage.rb', line 684

has_many :properties, class_name: "LWS::DigitalSignage::Layout::Element::Property"

#titleString?

Returns the title of the layout element.

Returns:

  • (String, nil)

    the title of the layout element



688
# File 'lib/lws/apps/digital_signage.rb', line 688

attribute :title

#versionLayout::Verion

Returns the layout version that contains the element.

Returns:

  • (Layout::Verion)

    the layout version that contains the element



693
694
# File 'lib/lws/apps/digital_signage.rb', line 693

belongs_to :version, class_name: "LWS::DigitalSignage::Layout::Version",
foreign_key: :layout_version_id