Magento Extensions Rating 2024
EXTENSIONS BY CATEGORY
B2B (Business-To-Business)
Blog
Customer
ERP (Enterprise Resource Planning)
Mega Menu
One Step Checkout
Order
POS (Point Of Sale)
Search
Shopping Cart
Sitemap
SEO
Social
Stock & Inventory Management
EXTENSIONS BY DEVELOPER
aheadWorks
Amasty
Boost My Shop
BSS Commerce
Magestore
MageWorx
Mirasvit
Templates Master
Wyomind
XTENTO
Magento 2 Documentation
Magento 2 Documentation
2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
vendor
magento
magento2-base
setup
src
Magento
Setup
Fixtures
PriceProvider.php
Go to the documentation of this file.
1
<?php
7
namespace
Magento\Setup\Fixtures
;
8
12
class
PriceProvider
13
{
20
public
function
getPrice
($productIndex)
21
{
22
mt_srand($productIndex);
23
switch
(mt_rand(0, 3)) {
24
case
0:
25
return
9.99;
26
case
1:
27
return
5;
28
case
2:
29
return
1;
30
case
3:
31
return
mt_rand(1, 10000) / 10;
32
}
33
}
34
}
Magento\Setup\Fixtures\PriceProvider
Definition:
PriceProvider.php:12
Magento\Setup\Fixtures\PriceProvider\getPrice
getPrice($productIndex)
Definition:
PriceProvider.php:20
Magento\Setup\Fixtures
Definition:
FixtureModelTest.php:7