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
module-catalog-inventory
Model
Source
StockConfiguration.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\CatalogInventory\Model\Source
;
7
8
use
Magento\Framework\Data\ValueSourceInterface
;
9
use
Magento\CatalogInventory\Api\StockConfigurationInterface
;
10
14
class
StockConfiguration
implements
ValueSourceInterface
15
{
19
protected
$stockConfiguration
;
20
24
public
function
__construct
(
StockConfigurationInterface
$stockConfiguration
)
25
{
26
$this->stockConfiguration =
$stockConfiguration
;
27
}
28
32
public
function
getValue
(
$name
)
33
{
34
$value
= $this->stockConfiguration->getDefaultConfigValue(
$name
);
35
return
is_numeric(
$value
) ? (float)
$value
:
$value
;
36
}
37
}
Magento\CatalogInventory\Model\Source\StockConfiguration
Definition:
StockConfiguration.php:14
$value
$value
Definition:
gender.phtml:16
Magento\CatalogInventory\Model\Source\StockConfiguration\__construct
__construct(StockConfigurationInterface $stockConfiguration)
Definition:
StockConfiguration.php:24
Magento\Framework\Data\ValueSourceInterface
Definition:
ValueSourceInterface.php:11
Magento\CatalogInventory\Api\StockConfigurationInterface
Definition:
StockConfigurationInterface.php:17
Magento\CatalogInventory\Model\Source\StockConfiguration\$stockConfiguration
$stockConfiguration
Definition:
StockConfiguration.php:19
Magento\CatalogInventory\Model\Source\StockConfiguration\getValue
getValue($name)
Definition:
StockConfiguration.php:32
Magento\CatalogInventory\Model\Source
Definition:
Backorders.php:6
$name
if(!isset($_GET['name'])) $name
Definition:
log.php:14