Skip to content

Commit

Permalink
add variable for entity type field
Browse files Browse the repository at this point in the history
  • Loading branch information
jalogut committed Nov 28, 2017
1 parent fccf97c commit f42df86
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion Preferences/templates/StmpflMagento2.xml
Original file line number Diff line number Diff line change
Expand Up @@ -620,10 +620,12 @@
<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; 'quote',&#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; 'order',&#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 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">
<variable name="quoteEntityType" expression="" defaultValue="&quot;quote&quot;" alwaysStopAt="true" />
<variable name="fieldname" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="type" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="length" expression="" defaultValue="" alwaysStopAt="true" />
<variable name="orderEntityType" expression="" defaultValue="&quot;order&quot;" alwaysStopAt="true" />
<context>
<option name="PHP" value="true" />
</context>
Expand Down

0 comments on commit f42df86

Please sign in to comment.