Skip to content

Commit 3b715e3

Browse files
author
Vadim Zubovich
committed
PR2-Stabilization: fixed according PR comments from Magento team
1 parent c4fb3ac commit 3b715e3

File tree

3 files changed

+6
-8
lines changed

3 files changed

+6
-8
lines changed

app/code/Magento/ProductVideo/Block/Adminhtml/Product/Edit/NewVideo.php

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ class NewVideo extends \Magento\Backend\Block\Widget\Form\Generic
2525
/**
2626
* @var \Magento\Framework\UrlInterface
2727
*/
28-
protected $_urlBuilder;
28+
protected $urlBuilder;
2929

3030
/**
3131
* @var \Magento\Framework\Json\EncoderInterface
@@ -35,7 +35,6 @@ class NewVideo extends \Magento\Backend\Block\Widget\Form\Generic
3535
/**
3636
* @param \Magento\Backend\Block\Template\Context $context
3737
* @param \Magento\ProductVideo\Helper\Media $mediaHelper
38-
* @param \Magento\Framework\UrlInterface $urlBuilder
3938
* @param \Magento\Framework\Json\EncoderInterface $jsonEncoder
4039
* @param \Magento\Framework\Registry $registry
4140
* @param \Magento\Framework\Data\FormFactory $formFactory
@@ -44,15 +43,14 @@ class NewVideo extends \Magento\Backend\Block\Widget\Form\Generic
4443
public function __construct(
4544
\Magento\Backend\Block\Template\Context $context,
4645
\Magento\ProductVideo\Helper\Media $mediaHelper,
47-
\Magento\Framework\UrlInterface $urlBuilder,
4846
\Magento\Framework\Json\EncoderInterface $jsonEncoder,
4947
\Magento\Framework\Registry $registry,
5048
\Magento\Framework\Data\FormFactory $formFactory,
5149
array $data = []
5250
) {
5351
parent::__construct($context, $registry, $formFactory, $data);
5452
$this->mediaHelper = $mediaHelper;
55-
$this->_urlBuilder = $urlBuilder;
53+
$this->urlBuilder = $context->getUrlBuilder();
5654
$this->jsonEncoder = $jsonEncoder;
5755
$this->setUseContainer(true);
5856
}
@@ -273,7 +271,7 @@ protected function getNoteVideoUrl()
273271
$result = __('YouTube and Vimeo supported.');
274272
if (is_null($this->mediaHelper->getYouTubeApiKey())) {
275273
$result = __(
276-
'Vimeo supported.<br>'
274+
'Vimeo supported.<br />'
277275
. 'To add YouTube video, please <a href="%1">enter YouTube API Key</a> first.'
278276
,
279277
$this->getConfigApiKeyUrl()
@@ -289,7 +287,7 @@ protected function getNoteVideoUrl()
289287
*/
290288
protected function getConfigApiKeyUrl()
291289
{
292-
return $this->_urlBuilder->getUrl(
290+
return $this->urlBuilder->getUrl(
293291
'adminhtml/system_config/edit',
294292
[
295293
'section' => 'catalog',

app/code/Magento/ProductVideo/Controller/Adminhtml/Product/Gallery/RetrieveImage.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -124,7 +124,8 @@ protected function localFileName($fileName)
124124
/**
125125
* @param string $fileUrl
126126
* @param string $localFilePath
127-
* @return bool|void
127+
* @return void
128+
* @throws \Magento\Framework\Exception\LocalizedException
128129
*/
129130
protected function retrieveRemoteImage($fileUrl, $localFilePath)
130131
{

app/code/Magento/ProductVideo/Model/Plugin/ExternalVideoResourceBackend.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@
77
namespace Magento\ProductVideo\Model\Plugin;
88

99
use Magento\Catalog\Model\ResourceModel\Product\Attribute\Backend\Media;
10-
use Magento\ProductVideo\Setup\InstallSchema;
1110

1211
/**
1312
* Attribute Media Resource decorator

0 commit comments

Comments
 (0)