Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions | Protected Attributes
Increment Class Reference

Public Member Functions

 __construct (EavConfig $eavConfig)
 
 getCurrentValue ()
 
 getNextValue ($storeId)
 

Protected Attributes

 $eavConfig
 
 $incrementValue
 

Detailed Description

Class Increment

Deprecated:
101.0.0

Definition at line 14 of file Increment.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( EavConfig  $eavConfig)
Parameters
EavConfig$eavConfig

Definition at line 29 of file Increment.php.

31  {
32  $this->eavConfig = $eavConfig;
33  }

Member Function Documentation

◆ getCurrentValue()

getCurrentValue ( )

Returns current increment id

Returns
string

Definition at line 40 of file Increment.php.

41  {
42  return $this->incrementValue;
43  }

◆ getNextValue()

getNextValue (   $storeId)

Returns new value of increment id

Parameters
int$storeId
Returns
string
Exceptions

Definition at line 53 of file Increment.php.

54  {
55  $this->incrementValue =
56  $this->eavConfig->getEntityType(Order::ENTITY)->fetchNewIncrementId($storeId);
57  return $this->incrementValue;
58  }

Field Documentation

◆ $eavConfig

$eavConfig
protected

Definition at line 19 of file Increment.php.

◆ $incrementValue

$incrementValue
protected

Definition at line 24 of file Increment.php.


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