Skip to content

Commit

Permalink
Update Save.php
Browse files Browse the repository at this point in the history
Added Constructor Arguments.
  • Loading branch information
Aditya Yadav authored Feb 3, 2019
1 parent d697ea6 commit 8faf8e9
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,15 @@ public function __construct(
\Magento\Framework\Registry $coreRegistry,
\Magento\Framework\App\Response\Http\FileFactory $fileFactory,
\Magento\Framework\Stdlib\DateTime\Filter\Date $dateFilter,
TimezoneInterface $timezone = null
TimezoneInterface $timezone = null,
DataPersistorInterface $dataPersistor = null
) {
parent::__construct($context, $coreRegistry, $fileFactory, $dateFilter);
$this->timezone = $timezone ?? \Magento\Framework\App\ObjectManager::getInstance()->get(
TimezoneInterface::class
);
$this->dataPersistor = $dataPersistor;
$this->dataPersistor = $dataPersistor ?? \Magento\Framework\App\ObjectManager::getInstance()->get(
DataPersistorInterface::class;
}

/**
Expand Down

0 comments on commit 8faf8e9

Please sign in to comment.