Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Public Member Functions
ItemStatus Class Reference
Inheritance diagram for ItemStatus:
DataObject ItemStatusInterface

Public Member Functions

 getId ()
 
 setId ($entityId)
 
 getDataHash ()
 
 setDataHash ($hash)
 
 getStatus ()
 
 setStatus ($status=self::STATUS_ACCEPTED)
 
 getErrorMessage ()
 
 setErrorMessage ($errorMessage=null)
 
 getErrorCode ()
 
 setErrorCode ($errorCode=null)
 
- Public Member Functions inherited from DataObject
 __construct (array $data=[])
 
 addData (array $arr)
 
 setData ($key, $value=null)
 
 unsetData ($key=null)
 
 getData ($key='', $index=null)
 
 getDataByPath ($path)
 
 getDataByKey ($key)
 
 setDataUsingMethod ($key, $args=[])
 
 getDataUsingMethod ($key, $args=null)
 
 hasData ($key='')
 
 toArray (array $keys=[])
 
 convertToArray (array $keys=[])
 
 toXml (array $keys=[], $rootName='item', $addOpenTag=false, $addCdata=true)
 
 convertToXml (array $arrAttributes=[], $rootName='item', $addOpenTag=false, $addCdata=true)
 
 toJson (array $keys=[])
 
 convertToJson (array $keys=[])
 
 toString ($format='')
 
 __call ($method, $args)
 
 isEmpty ()
 
 serialize ($keys=[], $valueSeparator='=', $fieldSeparator=' ', $quote='"')
 
 debug ($data=null, &$objects=[])
 
 offsetSet ($offset, $value)
 
 offsetExists ($offset)
 
 offsetUnset ($offset)
 
 offsetGet ($offset)
 

Additional Inherited Members

- Data Fields inherited from ItemStatusInterface
const ENTITY_ID = 'entity_id'
 
const DATA_HASH = 'data_hash'
 
const STATUS = 'status'
 
const ERROR_MESSAGE = 'error_message'
 
const ERROR_CODE = 'error_code'
 
const STATUS_ACCEPTED = 'accepted'
 
const STATUS_REJECTED = 'rejected'
 
- Protected Member Functions inherited from DataObject
 _getData ($key)
 
 _underscore ($name)
 
- Protected Attributes inherited from DataObject
 $_data = []
 
- Static Protected Attributes inherited from DataObject
static $_underscoreCache = []
 

Detailed Description

Definition at line 14 of file ItemStatus.php.

Member Function Documentation

◆ getDataHash()

getDataHash ( )

@inheritDoc

Implements ItemStatusInterface.

Definition at line 35 of file ItemStatus.php.

36  {
37  return $this->getData(self::DATA_HASH);
38  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getErrorCode()

getErrorCode ( )

@inheritDoc

Implements ItemStatusInterface.

Definition at line 87 of file ItemStatus.php.

88  {
89  return $this->getData(self::ERROR_CODE);
90  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getErrorMessage()

getErrorMessage ( )

@inheritDoc

Implements ItemStatusInterface.

Definition at line 67 of file ItemStatus.php.

68  {
69  return $this->getData(self::ERROR_MESSAGE);
70  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getId()

getId ( )

@inheritDoc

Implements ItemStatusInterface.

Definition at line 19 of file ItemStatus.php.

20  {
21  return $this->getData(self::ENTITY_ID);
22  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ getStatus()

getStatus ( )

@inheritDoc

Implements ItemStatusInterface.

Definition at line 51 of file ItemStatus.php.

52  {
53  return $this->getData(self::STATUS);
54  }
getData($key='', $index=null)
Definition: DataObject.php:119

◆ setDataHash()

setDataHash (   $hash)

@inheritDoc

Implements ItemStatusInterface.

Definition at line 43 of file ItemStatus.php.

44  {
45  return $this->setData(self::DATA_HASH, $hash);
46  }
setData($key, $value=null)
Definition: DataObject.php:72

◆ setErrorCode()

setErrorCode (   $errorCode = null)

@inheritDoc

Implements ItemStatusInterface.

Definition at line 95 of file ItemStatus.php.

96  {
97  if ($errorCode instanceof \Exception) {
98  $errorCode = $errorCode->getCode();
99  }
100 
101  return $this->setData(self::ERROR_CODE, (int) $errorCode);
102  }
setData($key, $value=null)
Definition: DataObject.php:72

◆ setErrorMessage()

setErrorMessage (   $errorMessage = null)

@inheritDoc

Implements ItemStatusInterface.

Definition at line 75 of file ItemStatus.php.

76  {
77  if ($errorMessage instanceof \Exception) {
78  $errorMessage = $errorMessage->getMessage();
79  }
80 
81  return $this->setData(self::ERROR_MESSAGE, $errorMessage);
82  }
setData($key, $value=null)
Definition: DataObject.php:72

◆ setId()

setId (   $entityId)

@inheritDoc

Implements ItemStatusInterface.

Definition at line 27 of file ItemStatus.php.

28  {
29  return $this->setData(self::ENTITY_ID, $entityId);
30  }
setData($key, $value=null)
Definition: DataObject.php:72

◆ setStatus()

setStatus (   $status = self::STATUS_ACCEPTED)

@inheritDoc

Implements ItemStatusInterface.

Definition at line 59 of file ItemStatus.php.

60  {
61  return $this->setData(self::STATUS, $status);
62  }
$status
Definition: order_status.php:8
setData($key, $value=null)
Definition: DataObject.php:72

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