Skip to content

Commit 3784977

Browse files
committed
Updated code and add logger
1 parent fe1d945 commit 3784977

File tree

14 files changed

+74
-51
lines changed

14 files changed

+74
-51
lines changed

Block/Adminhtml/Job/View.php

100644100755
Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,27 +3,26 @@
33
namespace Algolia\AlgoliaSearch\Block\Adminhtml\Job;
44

55
use Magento\Backend\Block\Widget\Button;
6-
use Magento\Framework\Session\SessionManager;
6+
use Magento\Framework\Session\SessionManagerInterface;
77
use Magento\Framework\View\Element\Template;
88
use Magento\Framework\View\Element\Template\Context;
99

1010
class View extends Template
1111
{
12-
/** @var SessionManager */
12+
/** @var SessionManagerInterface */
1313
protected $backendSession;
1414

1515
/**
1616
* @param Context $context
17-
* @param SessionManager $backendSession
17+
* @param SessionManagerInterface $backendSession
1818
* @param array $data
1919
*/
2020
public function __construct(
2121
Context $context,
22-
SessionManager $backendSession,
22+
SessionManagerInterface $backendSession,
2323
array $data = []
2424
) {
2525
parent::__construct($context, $data);
26-
2726
$this->backendSession = $backendSession;
2827
}
2928

Block/Adminhtml/LandingPage/SearchConfiguration.php

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
use Algolia\AlgoliaSearch\Helper\Data;
77
use Algolia\AlgoliaSearch\Model\LandingPage;
88
use Magento\Backend\Block\Template\Context;
9-
use Magento\Backend\Model\Session;
9+
use Magento\Framework\Session\SessionManagerInterface;
1010

1111
class SearchConfiguration extends \Magento\Backend\Block\Template
1212
{
1313
/** @var string */
1414
protected $_template = 'landingpage/search-configuration.phtml';
1515

16-
/** @var Session */
16+
/** @var SessionManagerInterface */
1717
protected $backendSession;
1818

1919
/** @var ConfigHelper */
@@ -27,14 +27,14 @@ class SearchConfiguration extends \Magento\Backend\Block\Template
2727

2828
/**
2929
* @param Context $context
30-
* @param Session $backendSession
30+
* @param SessionManagerInterface $backendSession
3131
* @param ConfigHelper $configHelper
3232
* @param Data $coreHelper
3333
* @param array $data
3434
*/
3535
public function __construct(
3636
Context $context,
37-
Session $backendSession,
37+
SessionManagerInterface $backendSession,
3838
ConfigHelper $configHelper,
3939
Data $coreHelper,
4040
array $data = []

Block/Adminhtml/Query/Merchandising.php

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,14 @@
66
use Algolia\AlgoliaSearch\Helper\Data;
77
use Algolia\AlgoliaSearch\Model\Query;
88
use Magento\Backend\Block\Template\Context;
9-
use Magento\Backend\Model\Session;
9+
use Magento\Framework\Session\SessionManagerInterface;
1010

1111
class Merchandising extends \Magento\Backend\Block\Template
1212
{
1313
/** @var string */
1414
protected $_template = 'query/edit/merchandising.phtml';
1515

16-
/** @var Session */
16+
/** @var SessionManagerInterface */
1717
protected $backendSession;
1818

1919
/** @var ConfigHelper */
@@ -27,14 +27,14 @@ class Merchandising extends \Magento\Backend\Block\Template
2727

2828
/**
2929
* @param Context $context
30-
* @param Session $backendSession
30+
* @param SessionManagerInterface $backendSession
3131
* @param ConfigHelper $configHelper
3232
* @param Data $coreHelper
3333
* @param array $data
3434
*/
3535
public function __construct(
3636
Context $context,
37-
Session $backendSession,
37+
SessionManagerInterface $backendSession,
3838
ConfigHelper $configHelper,
3939
Data $coreHelper,
4040
array $data = []

Block/Adminhtml/QueueArchive/View.php

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,23 @@
33
namespace Algolia\AlgoliaSearch\Block\Adminhtml\QueueArchive;
44

55
use Magento\Backend\Block\Widget\Button;
6-
use Magento\Framework\Session\SessionManager;
6+
use Magento\Framework\Session\SessionManagerInterface;
77
use Magento\Framework\View\Element\Template;
88
use Magento\Framework\View\Element\Template\Context;
99

1010
class View extends Template
1111
{
12-
/** @var SessionManager */
12+
/** @var SessionManagerInterface */
1313
protected $backendSession;
1414

1515
/**
1616
* @param Context $context
17-
* @param SessionManager $backendSession
17+
* @param SessionManagerInterface $backendSession
1818
* @param array $data
1919
*/
2020
public function __construct(
2121
Context $context,
22-
SessionManager $backendSession,
22+
SessionManagerInterface $backendSession,
2323
array $data = []
2424
) {
2525
parent::__construct($context, $data);

Controller/Adminhtml/Landingpage/AbstractAction.php

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,13 +5,13 @@
55
use Algolia\AlgoliaSearch\Helper\MerchandisingHelper;
66
use Algolia\AlgoliaSearch\Model\LandingPageFactory;
77
use Magento\Backend\App\Action\Context;
8-
use Magento\Backend\Model\Session;
8+
use Magento\Framework\Session\SessionManagerInterface;
99
use Magento\Store\Model\StoreManagerInterface;
1010

1111
abstract class AbstractAction extends \Magento\Backend\App\Action
1212
{
1313

14-
/** @var Session */
14+
/** @var SessionManagerInterface */
1515
protected $backendSession;
1616

1717
/** @var LandingPageFactory */
@@ -25,14 +25,14 @@ abstract class AbstractAction extends \Magento\Backend\App\Action
2525

2626
/**
2727
* @param Context $context
28-
* @param Session $backendSession
28+
* @param SessionManagerInterface $backendSession
2929
* @param LandingPageFactory $landingPageFactory
3030
* @param MerchandisingHelper $merchandisingHelper
3131
* @param StoreManagerInterface $storeManager
3232
*/
3333
public function __construct(
3434
Context $context,
35-
Session $backendSession,
35+
SessionManagerInterface $backendSession,
3636
LandingPageFactory $landingPageFactory,
3737
MerchandisingHelper $merchandisingHelper,
3838
StoreManagerInterface $storeManager

Controller/Adminhtml/Landingpage/Save.php

100644100755
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
use Algolia\AlgoliaSearch\Helper\ConfigHelper;
66
use Algolia\AlgoliaSearch\Helper\MerchandisingHelper;
77
use Algolia\AlgoliaSearch\Model\LandingPageFactory;
8-
use Magento\Backend\Model\Session;
8+
use Magento\Framework\Session\SessionManagerInterface;
99
use Magento\Framework\App\Request\DataPersistorInterface;
1010
use Magento\Framework\Controller\ResultFactory;
1111
use Magento\Framework\Exception\LocalizedException;
@@ -29,11 +29,16 @@ class Save extends AbstractAction
2929
*/
3030
protected $configHelper;
3131

32+
/**
33+
* @var SessionManagerInterface
34+
*/
35+
protected $backendSession;
36+
3237
/**
3338
* PHP Constructor
3439
*
3540
* @param \Magento\Backend\App\Action\Context $context
36-
* @param Session $backendSession
41+
* @param SessionManagerInterface $backendSession
3742
* @param LandingPageFactory $landingPageFactory
3843
* @param MerchandisingHelper $merchandisingHelper
3944
* @param StoreManagerInterface $storeManager
@@ -43,7 +48,7 @@ class Save extends AbstractAction
4348
*/
4449
public function __construct(
4550
\Magento\Backend\App\Action\Context $context,
46-
Session $backendSession,
51+
SessionManagerInterface $backendSession,
4752
LandingPageFactory $landingPageFactory,
4853
MerchandisingHelper $merchandisingHelper,
4954
StoreManagerInterface $storeManager,

Controller/Adminhtml/Query/AbstractAction.php

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
use Algolia\AlgoliaSearch\Helper\MerchandisingHelper;
66
use Algolia\AlgoliaSearch\Model\QueryFactory;
77
use Magento\Backend\App\Action\Context;
8-
use Magento\Backend\Model\Session;
8+
use Magento\Framework\Session\SessionManagerInterface;
99
use Magento\Store\Model\StoreManagerInterface;
1010

1111
abstract class AbstractAction extends \Magento\Backend\App\Action
1212
{
13-
/** @var Session */
13+
/** @var SessionManagerInterface */
1414
protected $backendSession;
1515

1616
/** @var QueryFactory */
@@ -24,14 +24,14 @@ abstract class AbstractAction extends \Magento\Backend\App\Action
2424

2525
/**
2626
* @param Context $context
27-
* @param Session $backendSession
27+
* @param SessionManagerInterface $backendSession
2828
* @param QueryFactory $queryFactory
2929
* @param MerchandisingHelper $merchandisingHelper
3030
* @param StoreManagerInterface $storeManager
3131
*/
3232
public function __construct(
3333
Context $context,
34-
Session $backendSession,
34+
SessionManagerInterface $backendSession,
3535
QueryFactory $queryFactory,
3636
MerchandisingHelper $merchandisingHelper,
3737
StoreManagerInterface $storeManager

Controller/Adminhtml/Query/Save.php

100644100755
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
use Algolia\AlgoliaSearch\Helper\MerchandisingHelper;
77
use Algolia\AlgoliaSearch\Model\ImageUploader;
88
use Algolia\AlgoliaSearch\Model\QueryFactory;
9-
use Magento\Backend\Model\Session;
9+
use Magento\Framework\Session\SessionManagerInterface;
1010
use Magento\Framework\App\Request\DataPersistorInterface;
1111
use Magento\Framework\Controller\ResultFactory;
1212
use Magento\Framework\Exception\LocalizedException;
@@ -29,11 +29,16 @@ class Save extends AbstractAction
2929
*/
3030
protected $imageUploader;
3131

32+
/**
33+
* @var SessionManagerInterface
34+
*/
35+
protected $backendSession;
36+
3237
/**
3338
* PHP Constructor
3439
*
3540
* @param \Magento\Backend\App\Action\Context $context
36-
* @param Session $backendSession
41+
* @param SessionManagerInterface $backendSession
3742
* @param QueryFactory $queryFactory
3843
* @param MerchandisingHelper $merchandisingHelper
3944
* @param StoreManagerInterface $storeManager
@@ -45,7 +50,7 @@ class Save extends AbstractAction
4550
*/
4651
public function __construct(
4752
\Magento\Backend\App\Action\Context $context,
48-
Session $backendSession,
53+
SessionManagerInterface $backendSession,
4954
QueryFactory $queryFactory,
5055
MerchandisingHelper $merchandisingHelper,
5156
StoreManagerInterface $storeManager,

Controller/Adminhtml/Queue/AbstractAction.php

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
use Algolia\AlgoliaSearch\Model\JobFactory;
66
use Algolia\AlgoliaSearch\Model\ResourceModel\Job as JobResourceModel;
77
use Magento\Backend\App\Action\Context;
8-
use Magento\Framework\Session\SessionManager;
8+
use Magento\Framework\Session\SessionManagerInterface;
99
use Magento\Indexer\Model\IndexerFactory;
1010

1111
abstract class AbstractAction extends \Magento\Backend\App\Action
1212
{
13-
/** @var SessionManager */
13+
/** @var SessionManagerInterface */
1414
protected $backendSession;
1515

1616
/** @var \Algolia\AlgoliaSearch\Model\JobFactory */
@@ -24,14 +24,14 @@ abstract class AbstractAction extends \Magento\Backend\App\Action
2424

2525
/**
2626
* @param Context $context
27-
* @param SessionManager $backendSession
27+
* @param SessionManagerInterface $backendSession
2828
* @param JobFactory $jobFactory
2929
* @param JobResourceModel $jobResourceModel
3030
* @param IndexerFactory $indexerFactory
3131
*/
3232
public function __construct(
3333
Context $context,
34-
SessionManager $backendSession,
34+
SessionManagerInterface $backendSession,
3535
JobFactory $jobFactory,
3636
JobResourceModel $jobResourceModel,
3737
IndexerFactory $indexerFactory

Controller/Adminhtml/QueueArchive/AbstractAction.php

100644100755
Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,12 +5,12 @@
55
use Algolia\AlgoliaSearch\Model\QueueArchiveFactory;
66
use Algolia\AlgoliaSearch\Model\ResourceModel\QueueArchive as QueueArchiveResourceModel;
77
use Magento\Backend\App\Action\Context;
8-
use Magento\Framework\Session\SessionManager;
8+
use Magento\Framework\Session\SessionManagerInterface;
99
use Magento\Indexer\Model\IndexerFactory;
1010

1111
abstract class AbstractAction extends \Magento\Backend\App\Action
1212
{
13-
/** @var SessionManager */
13+
/** @var SessionManagerInterface */
1414
protected $backendSession;
1515

1616
/** @var \Algolia\AlgoliaSearch\Model\QueueArchiveFactory */
@@ -24,14 +24,14 @@ abstract class AbstractAction extends \Magento\Backend\App\Action
2424

2525
/**
2626
* @param Context $context
27-
* @param SessionManager $backendSession
27+
* @param SessionManagerInterface $backendSession
2828
* @param QueueArchiveFactory $queueArchiveFactory
2929
* @param QueueArchiveResourceModel $queueArchiveResourceModel
3030
* @param IndexerFactory $indexerFactory
3131
*/
3232
public function __construct(
3333
Context $context,
34-
SessionManager $backendSession,
34+
SessionManagerInterface $backendSession,
3535
QueueArchiveFactory $queueArchiveFactory,
3636
QueueArchiveResourceModel $queueArchiveResourceModel,
3737
IndexerFactory $indexerFactory

0 commit comments

Comments
 (0)