Exemplo n.º 1
0
 /**
  * Return hash of image adapter codes and labels
  *
  * @return array
  */
 public function toOptionArray()
 {
     $result = [];
     foreach ($this->config->getAdapters() as $alias => $adapter) {
         $result[$alias] = __($adapter['title']);
     }
     return $result;
 }
Exemplo n.º 2
0
 /**
  * @param \Magento\Framework\ObjectManagerInterface $objectManager
  * @param Adapter\ConfigInterface $config
  * @param array $adapterMap
  */
 public function __construct(\Magento\Framework\ObjectManagerInterface $objectManager, \Magento\Framework\Image\Adapter\ConfigInterface $config, array $adapterMap = [])
 {
     $this->objectManager = $objectManager;
     $this->config = $config;
     $this->adapterMap = array_merge($config->getAdapters(), $adapterMap);
 }