/** * Returns prepared and configured image manager service * * @param \Krystal\Stdlib\VirtualEntity $config * @return \Krystal\Image\Tool\ImageManager */ private function getImageManager(VirtualEntity $config) { $plugins = array('thumb' => array('quality' => $config->getCoverQuality(), 'dimensions' => array(array(200, 200), array($config->getCoverWidth(), $config->getCoverHeight()), array($config->getThumbWidth(), $config->getThumbHeight())))); return new ImageManager('/data/uploads/module/news/posts/', $this->appConfig->getRootDir(), $this->appConfig->getRootUrl(), $plugins); }
/** * Returns product image manager * * @param \Krystal\Stdlib\VirtualEntity $config * @return \Krystal\Image\ImageManager */ private function getProductImageManager(VirtualEntity $config) { $plugins = array('thumb' => array('dimensions' => array(array(200, 200), array($config->getCoverWidth(), $config->getCoverHeight()), array($config->getCategoryCoverWidth(), $config->getCategoryCoverHeight()), array($config->getThumbWidth(), $config->getThumbHeight()))), 'original' => array('prefix' => 'original')); return new ImageManager('/data/uploads/module/shop/products/', $this->appConfig->getRootDir(), $this->appConfig->getRootUrl(), $plugins); }