示例#1
0
文件: Module.php 项目: bono-cms/News
 /**
  * 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);
 }
示例#2
0
文件: Module.php 项目: bono-cms/Shop
 /**
  * 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);
 }