Skip to content

Commit

Permalink
Move commands into separate files
Browse files Browse the repository at this point in the history
  • Loading branch information
vovayatsyuk committed Feb 10, 2020
1 parent c91e055 commit ff900e2
Show file tree
Hide file tree
Showing 5 changed files with 100 additions and 84 deletions.
56 changes: 56 additions & 0 deletions etc/marketplace/commands/cms_block.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
<?xml version="1.0"?>
<config>
<command class="Swissup\Marketplace\Installer\Command\CmsBlock">
<data>
<item>
<item name="title">slogan</item>
<item name="identifier">slogan</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/slogan.html</param>
</item>
</item>
<item>
<item name="title">homepage_callout</item>
<item name="identifier">homepage_callout</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/home_callout.html</param>
</item>
</item>
<item>
<item name="title">footer_contacts</item>
<item name="identifier">footer_contacts</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/footer_contacts.html</param>
</item>
</item>
<item>
<item name="title">footer_additional</item>
<item name="identifier">footer_additional</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/footer_additional.html</param>
</item>
</item>
<item>
<item name="title">footer_links_block</item>
<item name="identifier">footer_links_block</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/footer_links.html</param>
</item>
</item>
<item>
<item name="title">footer_payments</item>
<item name="identifier">footer_payments</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/footer_payments.html</param>
</item>
</item>
<item>
<item name="title">featured</item>
<item name="identifier">featured</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/featured_products.html</param>
</item>
</item>
</data>
</command>
</config>
15 changes: 15 additions & 0 deletions etc/marketplace/commands/cms_page.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0"?>
<config>
<command class="Swissup\Marketplace\Installer\Command\CmsPage">
<data>
<item>
<item name="title">Absolute Theme</item>
<item name="identifier">home</item>
<item name="page_layout">2columns-right</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_page/home.html</param>
</item>
</item>
</data>
</command>
</config>
11 changes: 11 additions & 0 deletions etc/marketplace/commands/config.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<?xml version="1.0"?>
<config>
<command class="Swissup\Marketplace\Installer\Command\Config">
<data>
<item name="design/theme/theme_id" helper="Swissup\Marketplace\Installer\Helper\Theme::getId">
<param name="theme">frontend/Swissup/absolute</param>
</item>
<item name="cms/wysiwyg/enabled">hidden</item>
</data>
</command>
</config>
14 changes: 14 additions & 0 deletions etc/marketplace/commands/product_attribute.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<?xml version="1.0"?>
<config>
<command class="Swissup\Marketplace\Installer\Command\ProductAttribute">
<data>
<item>
<item name="attribute_code">featured</item>
<item name="frontend_label">
<item>Featured</item>
</item>
<item name="default_value">0</item>
</item>
</data>
</command>
</config>
88 changes: 4 additions & 84 deletions etc/marketplace/installer.xml
Original file line number Diff line number Diff line change
Expand Up @@ -15,89 +15,9 @@
<conditions>
<param name="theme">swissup/theme-frontend-absolute</param>
</conditions>
<command class="Swissup\Marketplace\Installer\Command\Config">
<data>
<item name="design/theme/theme_id" helper="Swissup\Marketplace\Installer\Helper\Theme::getId">
<param name="theme">frontend/Swissup/absolute</param>
</item>
<item name="cms/wysiwyg/enabled">hidden</item>
</data>
</command>
<command class="Swissup\Marketplace\Installer\Command\CmsPage">
<data>
<item>
<item name="title">Absolute Theme</item>
<item name="identifier">home</item>
<item name="page_layout">2columns-right</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_page/home.html</param>
</item>
</item>
</data>
</command>
<command class="Swissup\Marketplace\Installer\Command\CmsBlock">
<data>
<item>
<item name="title">slogan</item>
<item name="identifier">slogan</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/slogan.html</param>
</item>
</item>
<item>
<item name="title">homepage_callout</item>
<item name="identifier">homepage_callout</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/home_callout.html</param>
</item>
</item>
<item>
<item name="title">footer_contacts</item>
<item name="identifier">footer_contacts</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/footer_contacts.html</param>
</item>
</item>
<item>
<item name="title">footer_additional</item>
<item name="identifier">footer_additional</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/footer_additional.html</param>
</item>
</item>
<item>
<item name="title">footer_links_block</item>
<item name="identifier">footer_links_block</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/footer_links.html</param>
</item>
</item>
<item>
<item name="title">footer_payments</item>
<item name="identifier">footer_payments</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/footer_payments.html</param>
</item>
</item>
<item>
<item name="title">featured</item>
<item name="identifier">featured</item>
<item name="content" helper="Swissup\Marketplace\Installer\Helper\Renderer::render">
<param name="path" type="path">content/cms_block/featured_products.html</param>
</item>
</item>
</data>
</command>
<command class="Swissup\Marketplace\Installer\Command\ProductAttribute">
<data>
<item>
<item name="attribute_code">featured</item>
<item name="frontend_label">
<item>Featured</item>
</item>
<item name="default_value">0</item>
</item>
</data>
</command>
<include path="commands/config.xml"/>
<include path="commands/cms_page.xml"/>
<include path="commands/cms_block.xml"/>
<include path="commands/product_attribute.xml"/>
</commands>
</config>

0 comments on commit ff900e2

Please sign in to comment.