Skip to content

Commit 8eddf1f

Browse files
author
Alex Paliarush
committed
MAGETWO-89542: Eliminate module versions in Git
2 parents 9b600ee + fc940f5 commit 8eddf1f

File tree

458 files changed

+13325
-2194
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

458 files changed

+13325
-2194
lines changed

app/code/Magento/AdminNotification/Block/System/Messages.php

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,24 +16,34 @@ class Messages extends \Magento\Backend\Block\Template
1616

1717
/**
1818
* @var \Magento\Framework\Json\Helper\Data
19+
* @deprecated
1920
*/
2021
protected $jsonHelper;
2122

23+
/**
24+
* @var \Magento\Framework\Serialize\Serializer\Json
25+
*/
26+
private $serializer;
27+
2228
/**
2329
* @param \Magento\Backend\Block\Template\Context $context
2430
* @param \Magento\AdminNotification\Model\ResourceModel\System\Message\Collection\Synchronized $messages
2531
* @param \Magento\Framework\Json\Helper\Data $jsonHelper
2632
* @param array $data
33+
* @param \Magento\Framework\Serialize\Serializer\Json|null $serializer
2734
*/
2835
public function __construct(
2936
\Magento\Backend\Block\Template\Context $context,
3037
\Magento\AdminNotification\Model\ResourceModel\System\Message\Collection\Synchronized $messages,
3138
\Magento\Framework\Json\Helper\Data $jsonHelper,
32-
array $data = []
39+
array $data = [],
40+
\Magento\Framework\Serialize\Serializer\Json $serializer = null
3341
) {
3442
$this->jsonHelper = $jsonHelper;
3543
parent::__construct($context, $data);
3644
$this->_messages = $messages;
45+
$this->serializer = $serializer ?: \Magento\Framework\App\ObjectManager::getInstance()
46+
->get(\Magento\Framework\Serialize\Serializer\Json::class);
3747
}
3848

3949
/**
@@ -117,7 +127,7 @@ protected function _getMessagesUrl()
117127
*/
118128
public function getSystemMessageDialogJson()
119129
{
120-
return $this->jsonHelper->jsonEncode(
130+
return $this->serializer->serialize(
121131
[
122132
'systemMessageDialog' => [
123133
'buttons' => [],

app/code/Magento/AdminNotification/Controller/Adminhtml/System/Message/ListAction.php

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,8 @@
66
*/
77
namespace Magento\AdminNotification\Controller\Adminhtml\System\Message;
88

9+
use Magento\Framework\Controller\ResultFactory;
10+
911
class ListAction extends \Magento\Backend\App\AbstractAction
1012
{
1113
/**
@@ -15,6 +17,7 @@ class ListAction extends \Magento\Backend\App\AbstractAction
1517

1618
/**
1719
* @var \Magento\Framework\Json\Helper\Data
20+
* @deprecated
1821
*/
1922
protected $jsonHelper;
2023

@@ -41,7 +44,7 @@ public function __construct(
4144
}
4245

4346
/**
44-
* @return void
47+
* @return \Magento\Framework\Controller\Result\Json
4548
*/
4649
public function execute()
4750
{
@@ -63,6 +66,9 @@ public function execute()
6366
. 'Please refresh the web page to clear the notice alert.',
6467
];
6568
}
66-
$this->getResponse()->representJson($this->jsonHelper->jsonEncode($result));
69+
/** @var \Magento\Framework\Controller\Result\Json $resultJson */
70+
$resultJson = $this->resultFactory->create(ResultFactory::TYPE_JSON);
71+
$resultJson->setData($result);
72+
return $resultJson;
6773
}
6874
}
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace Magento\AsynchronousOperations\Api;
10+
11+
/**
12+
* Interface BulkStatusInterface
13+
* Bulk summary data with list of operations items short data.
14+
*
15+
* @api
16+
*/
17+
interface BulkStatusInterface extends \Magento\Framework\Bulk\BulkStatusInterface
18+
{
19+
/**
20+
* Get Bulk summary data with list of operations items full data.
21+
*
22+
* @param string $bulkUuid
23+
* @return \Magento\AsynchronousOperations\Api\Data\DetailedBulkOperationsStatusInterface
24+
* @throws \Magento\Framework\Exception\NoSuchEntityException
25+
*/
26+
public function getBulkDetailedStatus($bulkUuid);
27+
28+
/**
29+
* Get Bulk summary data with list of operations items short data.
30+
*
31+
* @param string $bulkUuid
32+
* @return \Magento\AsynchronousOperations\Api\Data\BulkOperationsStatusInterface
33+
* @throws \Magento\Framework\Exception\NoSuchEntityException
34+
*/
35+
public function getBulkShortStatus($bulkUuid);
36+
}
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace Magento\AsynchronousOperations\Api\Data;
10+
11+
/**
12+
* Interface AsyncResponseInterface
13+
* Temporary data object to give response from webapi async router
14+
*
15+
* @api
16+
*/
17+
interface AsyncResponseInterface
18+
{
19+
const BULK_UUID = 'bulk_uuid';
20+
const REQUEST_ITEMS = 'request_items';
21+
const ERRORS = 'errors';
22+
23+
/**
24+
* Gets the bulk uuid.
25+
*
26+
* @return string Bulk Uuid.
27+
*/
28+
public function getBulkUuid();
29+
30+
/**
31+
* Sets the bulk uuid.
32+
*
33+
* @param string $bulkUuid
34+
* @return $this
35+
*/
36+
public function setBulkUuid($bulkUuid);
37+
38+
/**
39+
* Gets the list of request items with status data.
40+
*
41+
* @return \Magento\AsynchronousOperations\Api\Data\ItemStatusInterface[]
42+
*/
43+
public function getRequestItems();
44+
45+
/**
46+
* Sets the list of request items with status data.
47+
*
48+
* @param \Magento\AsynchronousOperations\Api\Data\ItemStatusInterface[] $requestItems
49+
* @return $this
50+
*/
51+
public function setRequestItems($requestItems);
52+
53+
/**
54+
* @param bool $isErrors
55+
* @return $this
56+
*/
57+
public function setErrors($isErrors = false);
58+
59+
/**
60+
* Is there errors during processing bulk
61+
*
62+
* @return boolean
63+
*/
64+
public function isErrors();
65+
66+
/**
67+
* Retrieve existing extension attributes object.
68+
*
69+
* @return \Magento\AsynchronousOperations\Api\Data\AsyncResponseExtensionInterface|null
70+
*/
71+
public function getExtensionAttributes();
72+
73+
/**
74+
* Set an extension attributes object.
75+
*
76+
* @param \Magento\AsynchronousOperations\Api\Data\AsyncResponseExtensionInterface $extensionAttributes
77+
* @return $this
78+
*/
79+
public function setExtensionAttributes(
80+
\Magento\AsynchronousOperations\Api\Data\AsyncResponseExtensionInterface $extensionAttributes
81+
);
82+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace Magento\AsynchronousOperations\Api\Data;
10+
11+
/**
12+
* Interface BulkStatusInterface
13+
*
14+
* Bulk summary data with list of operations items summary data.
15+
*
16+
* @api
17+
*/
18+
interface BulkOperationsStatusInterface extends BulkSummaryInterface
19+
{
20+
21+
const OPERATIONS_LIST = 'operations_list';
22+
23+
/**
24+
* Retrieve list of operation with statuses (short data).
25+
*
26+
* @return \Magento\AsynchronousOperations\Api\Data\SummaryOperationStatusInterface[]
27+
*/
28+
public function getOperationsList();
29+
30+
/**
31+
* Set operations list.
32+
*
33+
* @param \Magento\AsynchronousOperations\Api\Data\SummaryOperationStatusInterface[] $operationStatusList
34+
* @return $this
35+
*/
36+
public function setOperationsList($operationStatusList);
37+
}
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace Magento\AsynchronousOperations\Api\Data;
10+
11+
/**
12+
* Interface BulkStatusInterface
13+
*
14+
* Bulk summary data with list of operations items full data.
15+
*
16+
* @api
17+
*/
18+
interface DetailedBulkOperationsStatusInterface extends BulkSummaryInterface
19+
{
20+
21+
const OPERATIONS_LIST = 'operations_list';
22+
23+
/**
24+
* Retrieve operations list.
25+
*
26+
* @return \Magento\AsynchronousOperations\Api\Data\DetailedOperationStatusInterface[]
27+
*/
28+
public function getOperationsList();
29+
30+
/**
31+
* Set operations list.
32+
*
33+
* @param \Magento\AsynchronousOperations\Api\Data\DetailedOperationStatusInterface[] $operationStatusList
34+
* @return $this
35+
*/
36+
public function setOperationsList($operationStatusList);
37+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
<?php
2+
/**
3+
* Copyright © Magento, Inc. All rights reserved.
4+
* See COPYING.txt for license details.
5+
*/
6+
7+
declare(strict_types=1);
8+
9+
namespace Magento\AsynchronousOperations\Api\Data;
10+
11+
/**
12+
* @api
13+
*/
14+
interface DetailedOperationStatusInterface extends OperationInterface
15+
{
16+
/**
17+
* Result serialized Data
18+
*
19+
* @return string
20+
*/
21+
public function getResultSerializedData();
22+
23+
/**
24+
* Set result serialized data
25+
*
26+
* @param string $resultSerializedData
27+
* @return $this
28+
*/
29+
public function setResultSerializedData($resultSerializedData);
30+
}

0 commit comments

Comments
 (0)