class AlwaysInStockService in Commerce Stock 8
A stock service for always in stock products.
Hierarchy
- class \Drupal\commerce_stock\AlwaysInStockService implements StockServiceInterface
Expanded class hierarchy of AlwaysInStockService
1 string reference to 'AlwaysInStockService'
1 service uses AlwaysInStockService
File
- src/
AlwaysInStockService.php, line 8
Namespace
Drupal\commerce_stockView source
class AlwaysInStockService implements StockServiceInterface {
/**
* The stock checker.
*
* @var \Drupal\commerce_stock\StockCheckInterface
*/
protected $stockChecker;
/**
* The stock updater.
*
* @var \Drupal\commerce_stock\StockUpdateInterface
*/
protected $stockUpdater;
/**
* The stock service configuration.
*
* @var \Drupal\commerce_stock\StockServiceConfigInterface
*/
protected $stockServiceConfig;
/**
* Constructs a new AlwaysInStockService object.
*/
public function __construct() {
$this->stockChecker = new AlwaysInStock();
$this->stockUpdater = $this->stockChecker;
$this->stockServiceConfig = new StockServiceConfig();
}
/**
* {@inheritdoc}
*/
public function getName() {
return 'Always in stock';
}
/**
* {@inheritdoc}
*/
public function getId() {
return 'always_in_stock';
}
/**
* {@inheritdoc}
*/
public function getStockChecker() {
return $this->stockChecker;
}
/**
* {@inheritdoc}
*/
public function getStockUpdater() {
return $this->stockUpdater;
}
/**
* {@inheritdoc}
*/
public function getConfiguration() {
return $this->stockServiceConfig;
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
AlwaysInStockService:: |
protected | property | The stock checker. | |
AlwaysInStockService:: |
protected | property | The stock service configuration. | |
AlwaysInStockService:: |
protected | property | The stock updater. | |
AlwaysInStockService:: |
public | function |
Gets the stock Configuration. Overrides StockServiceInterface:: |
|
AlwaysInStockService:: |
public | function |
Gets the id of the service. Overrides StockServiceInterface:: |
|
AlwaysInStockService:: |
public | function |
Gets the name of the service. Overrides StockServiceInterface:: |
|
AlwaysInStockService:: |
public | function |
Gets the stock checker. Overrides StockServiceInterface:: |
|
AlwaysInStockService:: |
public | function |
Gets the stock updater. Overrides StockServiceInterface:: |
|
AlwaysInStockService:: |
public | function | Constructs a new AlwaysInStockService object. |