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
dev
tests
api-functional
_files
Magento
TestModule4
Service
V1
DataObjectService.php
Go to the documentation of this file.
1
<?php
6
namespace
Magento\TestModule4\Service\V1
;
7
8
use
Magento\TestModule4\Service\V1\Entity\DataObjectRequest
;
9
use Magento\TestModule4\Service\V1\Entity\DataObjectResponseFactory;
10
use
Magento\TestModule4\Service\V1\Entity\ExtensibleRequestInterface
;
11
use
Magento\TestModule4\Service\V1\Entity\NestedDataObjectRequest
;
12
13
class
DataObjectService
implements
\Magento\TestModule4\Service\V1\DataObjectServiceInterface
14
{
18
protected
$responseFactory
;
19
23
public
function
__construct
(DataObjectResponseFactory
$responseFactory
)
24
{
25
$this->responseFactory =
$responseFactory
;
26
}
27
31
public
function
getData
(
$id
)
32
{
33
return
$this->responseFactory->create()->setEntityId(
$id
)->setName(
"Test"
);
34
}
35
39
public
function
updateData
(
$id
,
DataObjectRequest
$request
)
40
{
41
return
$this->responseFactory->create()->setEntityId(
$id
)->setName(
$request
->getName());
42
}
43
47
public
function
nestedData
(
$id
,
NestedDataObjectRequest
$request
)
48
{
49
return
$this->responseFactory->create()->setEntityId(
$id
)->setName(
$request
->getDetails()->getName());
50
}
51
58
public
function
scalarResponse
(
$id
)
59
{
60
return
$id
;
61
}
62
66
public
function
extensibleDataObject
(
$id
,
ExtensibleRequestInterface
$request
)
67
{
68
return
$this->responseFactory->create()->setEntityId(
$id
)->setName(
$request
->getName());
69
}
70
}
Magento\TestModule4\Service\V1\Entity\ExtensibleRequestInterface
Definition:
ExtensibleRequestInterface.php:8
Magento\TestModule4\Service\V1\DataObjectService\nestedData
nestedData($id, NestedDataObjectRequest $request)
Definition:
DataObjectService.php:47
Magento\TestModule4\Service\V1\Entity\NestedDataObjectRequest
Definition:
NestedDataObjectRequest.php:8
Magento\TestModule4\Service\V1\DataObjectService\updateData
updateData($id, DataObjectRequest $request)
Definition:
DataObjectService.php:39
$id
$id
Definition:
fieldset.phtml:14
Magento\TestModule4\Service\V1
Definition:
DataObjectService.php:6
Magento\TestModule4\Service\V1\DataObjectService\getData
getData($id)
Definition:
DataObjectService.php:31
Magento\TestModule4\Service\V1\DataObjectService\scalarResponse
scalarResponse($id)
Definition:
DataObjectService.php:58
Magento\TestModule4\Service\V1\DataObjectService\$responseFactory
$responseFactory
Definition:
DataObjectService.php:18
Magento\TestModule4\Service\V1\DataObjectServiceInterface
Definition:
DataObjectServiceInterface.php:12
Magento\TestModule4\Service\V1\Entity\DataObjectRequest
Definition:
DataObjectRequest.php:8
$request
$request
Definition:
quote_with_configurable_product_last_variation.php:22
Magento\TestModule4\Service\V1\DataObjectService\__construct
__construct(DataObjectResponseFactory $responseFactory)
Definition:
DataObjectService.php:23
Magento\TestModule4\Service\V1\DataObjectService\extensibleDataObject
extensibleDataObject($id, ExtensibleRequestInterface $request)
Definition:
DataObjectService.php:66
Magento\TestModule4\Service\V1\DataObjectService
Definition:
DataObjectService.php:13