Class: Maglev::GetPageSections

Inherits:
Object
  • Object
show all
Includes:
Injectable, TransformCollectionItemConcern, TransformLinkConcern, TransformTextConcern
Defined in:
app/services/maglev/get_page_sections.rb

Overview

Get the content of a page in a specific locale. The content comes from the sections of the page. Also replace the links by their real values based on the context (live editing or not).

Defined Under Namespace

Modules: TransformCollectionItemConcern, TransformLinkConcern, TransformTextConcern

Instance Method Summary collapse

Methods included from TransformCollectionItemConcern

#transform_collection_item_content_setting

Methods included from TransformLinkConcern

#get_fullpath_from_link, #replace_href_in_link, #transform_link_content_setting

Methods included from TransformTextConcern

#find_link_page_path, #replace_links_in_text, #transform_text_content_setting

Instance Method Details

#callObject



23
24
25
26
27
# File 'app/services/maglev/get_page_sections.rb', line 23

def call
  (page_sections || page.sections || []).map do |section|
    transform_section(section.dup)
  end
end