Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Data Fields | Protected Attributes
TaxRulesFixture Class Reference
Inheritance diagram for TaxRulesFixture:
Fixture

Public Member Functions

 __construct (FixtureModel $fixtureModel, TaxRuleRepositoryInterface $taxRuleRepository, TaxRuleInterfaceFactory $taxRuleFactory, CollectionFactory $taxRateCollectionFactory, TaxRateInterfaceFactory $taxRateFactory, TaxRateRepositoryInterface $taxRateRepository, ConfigWriter $configWriter)
 
 getActionTitle ()
 
 introduceParamLabels ()
 
- Public Member Functions inherited from Fixture
 __construct (FixtureModel $fixtureModel)
 
 execute ()
 
 getActionTitle ()
 
 printInfo (OutputInterface $output)
 
 introduceParamLabels ()
 
 getPriority ()
 

Data Fields

const DEFAULT_CUSTOMER_TAX_CLASS_ID = 3
 
const DEFAULT_PRODUCT_TAX_CLASS_ID = 2
 
const DEFAULT_TAX_MODE = 'VAT'
 
const DEFAULT_TAX_RATE = 5
 
const DEFAULT_TAX_COUNTRY = 'US'
 

Protected Attributes

 $priority = 101
 
- Protected Attributes inherited from Fixture
 $priority
 
 $fixtureModel
 

Detailed Description

Tax rules fixture generator Tax Config Settings setter for different Tax Modes (for example VAT)

@SuppressWarnings(PHPMD.CouplingBetweenObjects)

Definition at line 26 of file TaxRulesFixture.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( FixtureModel  $fixtureModel,
TaxRuleRepositoryInterface  $taxRuleRepository,
TaxRuleInterfaceFactory  $taxRuleFactory,
CollectionFactory  $taxRateCollectionFactory,
TaxRateInterfaceFactory  $taxRateFactory,
TaxRateRepositoryInterface  $taxRateRepository,
ConfigWriter  $configWriter 
)
Parameters
FixtureModel$fixtureModel
TaxRuleRepositoryInterface$taxRuleRepository
TaxRuleInterfaceFactory$taxRuleFactory
CollectionFactory$taxRateCollectionFactory
TaxRateInterfaceFactory$taxRateFactory
TaxRateRepositoryInterface$taxRateRepository
ConfigWriter$configWriter

Definition at line 105 of file TaxRulesFixture.php.

113  {
114  parent::__construct($fixtureModel);
115 
116  $this->taxRuleRepository = $taxRuleRepository;
117  $this->taxRuleFactory = $taxRuleFactory;
118  $this->taxRateCollectionFactory = $taxRateCollectionFactory;
119  $this->taxRateFactory = $taxRateFactory;
120  $this->taxRateRepository = $taxRateRepository;
121  $this->configWriter = $configWriter;
122  }

Member Function Documentation

◆ getActionTitle()

getActionTitle ( )

{}

Definition at line 211 of file TaxRulesFixture.php.

212  {
213  return 'Generating tax rules';
214  }

◆ introduceParamLabels()

introduceParamLabels ( )

{}

Definition at line 219 of file TaxRulesFixture.php.

220  {
221  return [
222  'tax_rules' => 'Tax Rules Count',
223  'tax_mode' => 'Tax Mode',
224  ];
225  }

Field Documentation

◆ $priority

$priority = 101
protected

Definition at line 64 of file TaxRulesFixture.php.

◆ DEFAULT_CUSTOMER_TAX_CLASS_ID

const DEFAULT_CUSTOMER_TAX_CLASS_ID = 3

Definition at line 28 of file TaxRulesFixture.php.

◆ DEFAULT_PRODUCT_TAX_CLASS_ID

const DEFAULT_PRODUCT_TAX_CLASS_ID = 2

Definition at line 30 of file TaxRulesFixture.php.

◆ DEFAULT_TAX_COUNTRY

const DEFAULT_TAX_COUNTRY = 'US'

Definition at line 36 of file TaxRulesFixture.php.

◆ DEFAULT_TAX_MODE

const DEFAULT_TAX_MODE = 'VAT'

Definition at line 32 of file TaxRulesFixture.php.

◆ DEFAULT_TAX_RATE

const DEFAULT_TAX_RATE = 5

Definition at line 34 of file TaxRulesFixture.php.


The documentation for this class was generated from the following file: