Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit ddd3f5c2 authored by Nicolas's avatar Nicolas
Browse files

Gestion des valeurs de system.xml pour les vidéos

parent 12958112
No related branches found
No related tags found
No related merge requests found
......@@ -7,6 +7,7 @@ use \Magento\Framework\App\Filesystem\DirectoryList;
use \Magento\Framework\Image\AdapterFactory as ImageAdapterFactory;
use \Magento\Framework\View\Element\Template;
use \Magento\Framework\View\Element\Template\Context;
use \Magento\Store\Model\ScopeInterface;
use \Magento\Store\Model\StoreManagerInterface;
use \Magento\Widget\Block\BlockInterface;
......@@ -87,18 +88,7 @@ class Video extends Template implements BlockInterface
* if keepAspectRatio(false).
* - backgroundColor[null]: Default white
*/
protected $defaultSettings = [
'constrainOnly' => true,
'keepAspectRatio' => true,
'keepTransparency' => true,
'keepFrame' => false,
'backgroundColor' => null,
'identifier' => 'mmi',
'basename' => '',
'width' => 1920,
'height' => 1080,
'compression' => 60
];
protected $defaultSettings = [];
/**
* @var ImageOptimizer
......@@ -133,6 +123,19 @@ class Video extends Template implements BlockInterface
$this->imageOptimizer = $imageOptimizer;
parent::__construct($context, $data);
$this->defaultSettings = [
'constrainOnly' => $this->_scopeConfig->getValue('mediamangervideo/resize/constrain_only', ScopeInterface::SCOPE_STORE),
'keepAspectRatio' => $this->_scopeConfig->getValue('mediamangervideo/resize/keep_aspect_ratio', ScopeInterface::SCOPE_STORE),
'keepTransparency' => $this->_scopeConfig->getValue('mediamangervideo/resize/keep_transparency', ScopeInterface::SCOPE_STORE),
'keepFrame' => $this->_scopeConfig->getValue('mediamangervideo/resize/keep_frame', ScopeInterface::SCOPE_STORE),
'backgroundColor' => $this->_scopeConfig->getValue('mediamangervideo/resize/background_color', ScopeInterface::SCOPE_STORE),
'identifier' => $this->_scopeConfig->getValue('mediamangervideo/save/identifier', ScopeInterface::SCOPE_STORE),
'basename' => $this->_scopeConfig->getValue('mediamangervideo/save/basename', ScopeInterface::SCOPE_STORE),
'width' => $this->_scopeConfig->getValue('mediamangervideo/save/width', ScopeInterface::SCOPE_STORE),
'height' => $this->_scopeConfig->getValue('mediamangervideo/save/height', ScopeInterface::SCOPE_STORE),
'compression' => $this->_scopeConfig->getValue('mediamangervideo/save/compression', ScopeInterface::SCOPE_STORE)
];
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment