6
6
*/
7
7
namespace Magento \Sales \Controller \Adminhtml \Order ;
8
8
9
+ use Magento \Backend \App \Action ;
10
+
9
11
class CommentsHistory extends \Magento \Sales \Controller \Adminhtml \Order
10
12
{
13
+ /**
14
+ * @var \Magento\Framework\View\LayoutFactory
15
+ */
16
+ protected $ layoutFactory ;
17
+
18
+ /**
19
+ * @param Action\Context $context
20
+ * @param \Magento\Framework\Registry $coreRegistry
21
+ * @param \Magento\Framework\App\Response\Http\FileFactory $fileFactory
22
+ * @param \Magento\Framework\Translate\InlineInterface $translateInline
23
+ * @param \Magento\Framework\View\Result\PageFactory $resultPageFactory
24
+ * @param \Magento\Backend\Model\View\Result\RedirectFactory $resultRedirectFactory
25
+ * @param \Magento\Framework\Controller\Result\JSONFactory $resultJsonFactory
26
+ * @param \Magento\Framework\View\Result\LayoutFactory $resultLayoutFactory
27
+ * @param \Magento\Framework\Controller\Result\RawFactory $resultRawFactory
28
+ * @param \Magento\Framework\View\LayoutFactory $layoutFactory
29
+ */
30
+ public function __construct (
31
+ Action \Context $ context ,
32
+ \Magento \Framework \Registry $ coreRegistry ,
33
+ \Magento \Framework \App \Response \Http \FileFactory $ fileFactory ,
34
+ \Magento \Framework \Translate \InlineInterface $ translateInline ,
35
+ \Magento \Framework \View \Result \PageFactory $ resultPageFactory ,
36
+ \Magento \Backend \Model \View \Result \RedirectFactory $ resultRedirectFactory ,
37
+ \Magento \Framework \Controller \Result \JSONFactory $ resultJsonFactory ,
38
+ \Magento \Framework \View \Result \LayoutFactory $ resultLayoutFactory ,
39
+ \Magento \Framework \Controller \Result \RawFactory $ resultRawFactory ,
40
+ \Magento \Framework \View \LayoutFactory $ layoutFactory
41
+ ) {
42
+ $ this ->layoutFactory = $ layoutFactory ;
43
+ parent ::__construct (
44
+ $ context ,
45
+ $ coreRegistry ,
46
+ $ fileFactory ,
47
+ $ translateInline ,
48
+ $ resultPageFactory ,
49
+ $ resultRedirectFactory ,
50
+ $ resultJsonFactory ,
51
+ $ resultLayoutFactory ,
52
+ $ resultRawFactory
53
+ );
54
+ }
55
+
11
56
/**
12
57
* Generate order history for ajax request
13
58
*
@@ -16,9 +61,8 @@ class CommentsHistory extends \Magento\Sales\Controller\Adminhtml\Order
16
61
public function execute ()
17
62
{
18
63
$ this ->_initOrder ();
19
- $ resultLayout = $ this ->resultLayoutFactory ->create ();
20
- $ html = $ resultLayout ->getLayout ()
21
- ->createBlock ('Magento\Sales\Block\Adminhtml\Order\View\Tab\History ' )
64
+ $ layout = $ this ->layoutFactory ->create ();
65
+ $ html = $ layout ->createBlock ('Magento\Sales\Block\Adminhtml\Order\View\Tab\History ' )
22
66
->toHtml ();
23
67
$ this ->_translateInline ->processResponseBody ($ html );
24
68
/** @var \Magento\Framework\Controller\Result\Raw $resultRaw */
0 commit comments