Skip to content

Commit

Permalink
Fix '2magento setup order quote field' to work also with compilated code
Browse files Browse the repository at this point in the history
  • Loading branch information
jalogut committed Dec 12, 2017
1 parent e54547a commit 180b865
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Preferences/templates/StmpflMagento2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -620,7 +620,7 @@
<option name="XML" value="true" />
</context>
</template>
<template name="2magento setup order quote field" value="// @todo: move in top of the class &#10;// /**&#10;// * @var \Magento\Sales\Setup\SalesSetupFactory&#10;// */&#10;// private $salesSetupFactory;&#10;// /**&#10;// * @var \Magento\Quote\Setup\QuoteSetupFactory&#10;// */&#10;// private $quoteSetupFactory;&#10;//&#10;// public function __construct(&#10;// \Magento\Sales\Setup\SalesSetupFactory $salesSetupFactory,&#10;// \Magento\Quote\Setup\QuoteSetupFactory $quoteSetupFactory&#10;// ) {&#10;// $this-&gt;salesSetupFactory = $salesSetupFactory;&#10;// $this-&gt;quoteSetupFactory = $quoteSetupFactory;&#10;// }&#10; &#10;/** @var \Magento\Quote\Setup\QuoteSetup $quoteSetup */&#10;$quoteSetup = $this-&gt;quoteSetupFactory-&gt;create();&#10;$quoteSetup-&gt;addAttribute(&#10; '$quoteEntityType$',&#10; '$fieldname$',&#10; ['type' =&gt; \Magento\Framework\DB\Ddl\Table::$type$, 'length' =&gt; $length$, 'nullable' =&gt; true, 'comment' =&gt; 'Quote $fieldname$']&#10;);&#10;/** @var \Magento\Sales\Setup\SalesSetup $salesSetup */&#10;$salesSetup = $this-&gt;salesSetupFactory-&gt;create();&#10;$salesSetup-&gt;addAttribute(&#10; '$orderEntityType$',&#10; '$fieldname$',&#10; ['type' =&gt; \Magento\Framework\DB\Ddl\Table::$type$, 'length' =&gt; $length$, 'nullable' =&gt; true, 'grid' =&gt; false, 'comment' =&gt; 'Order $fieldname$']&#10;);&#10;&#10;// @todo: Add into module.xml&#10;// &lt;sequence&gt;&#10;// &lt;module name=&quot;Magento_Quote&quot;/&gt;&#10;// &lt;module name=&quot;Magento_Sales&quot;/&gt;&#10;// &lt;/sequence&gt;" toReformat="false" toShortenFQNames="true">
<template name="2magento setup order quote field" value="// @todo: move on top of your installData/upgradeData class. &#10;// /**&#10;// * @var \Magento\Sales\Setup\SalesSetupFactory&#10;// */&#10;// private $salesSetupFactory;&#10;// /**&#10;// * @var \Magento\Quote\Setup\QuoteSetupFactory&#10;// */&#10;// private $quoteSetupFactory;&#10;//&#10;// public function __construct(&#10;// \Magento\Sales\Setup\SalesSetupFactory $salesSetupFactory,&#10;// \Magento\Quote\Setup\QuoteSetupFactory $quoteSetupFactory&#10;// ) {&#10;// $this-&gt;salesSetupFactory = $salesSetupFactory;&#10;// $this-&gt;quoteSetupFactory = $quoteSetupFactory;&#10;// }&#10; &#10;/** @var \Magento\Framework\Setup\ModuleDataSetupInterface $setup */&#10;/** @var \Magento\Quote\Setup\QuoteSetup $quoteSetup */&#10;$quoteSetup = $this-&gt;quoteSetupFactory-&gt;create(['setup' =&gt; $setup]);&#10;$quoteSetup-&gt;addAttribute(&#10; '$quoteEntityType$',&#10; '$fieldname$',&#10; ['type' =&gt; \Magento\Framework\DB\Ddl\Table::$type$, 'length' =&gt; $length$, 'nullable' =&gt; true, 'comment' =&gt; 'Quote $fieldname$']&#10;);&#10;/** @var \Magento\Sales\Setup\SalesSetup $salesSetup */&#10;$salesSetup = $this-&gt;salesSetupFactory-&gt;create(['setup' =&gt; $setup]);&#10;$salesSetup-&gt;addAttribute(&#10; '$orderEntityType$',&#10; '$fieldname$',&#10; ['type' =&gt; \Magento\Framework\DB\Ddl\Table::$type$, 'length' =&gt; $length$, 'nullable' =&gt; true, 'grid' =&gt; false, 'comment' =&gt; 'Order $fieldname$']&#10;);&#10;&#10;// @todo: Add into module.xml&#10;// &lt;sequence&gt;&#10;// &lt;module name=&quot;Magento_Quote&quot;/&gt;&#10;// &lt;module name=&quot;Magento_Sales&quot;/&gt;&#10;// &lt;/sequence&gt;" toReformat="false" toShortenFQNames="true">
<variable name="quoteEntityType" expression="" defaultValue="&quot;quote&quot;" alwaysStopAt="true" />
<variable name="fieldname" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="type" expression="" defaultValue="" alwaysStopAt="true" />
Expand Down

0 comments on commit 180b865

Please sign in to comment.